Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 7ee5d7e

Browse files
committed
2 parents f93d9a1 + 9337f18 commit 7ee5d7e

File tree

15 files changed

+208
-126
lines changed

15 files changed

+208
-126
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ pids
88
*.pid
99
*.seed
1010

11+
# License files
12+
license-*.txt
13+
1114
# Directory for instrumented libs generated by jscoverage/JSCover
1215
lib-cov
1316

.travis/deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ else
125125

126126
# Configure the Git repository and clean any untracked and unignored build files.
127127
git config user.name "Travis CI"
128-
git config user.email "noreply@travis.ibm.com"
129-
git checkout -b develop
128+
git config user.email "noreply@travis-ci.org"
129+
git checkout -b master
130130
git reset --hard
131131
git clean -d -f
132132

@@ -137,7 +137,7 @@ else
137137
# Add the version number changes and push them to Git.
138138
git add .
139139
git commit -m "Automatic version bump to ${NEW_VERSION}"
140-
git push origin develop
140+
git push origin master
141141

142142
fi
143143
date

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ You must run the following commands in order to pull the Hyperledger fabric chai
1515

1616
You should see messages indicating that the required git repositories have been cloned into the correct vendor subdirectory.
1717

18+
> The git submodule should not be required now, they have been added to the npm install step. When this has been confirmed as working well, this will be updated.
19+
1820
You must install [Lerna](https://lernajs.io) to build this multi-package repository:
1921

2022
$ npm install -g lerna

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"devDependencies": {
33
"colors": "^1.1.2",
44
"lerna": "2.0.0-beta.32",
5+
"licensecheck": "^1.3.0",
56
"moment": "^2.17.1",
67
"semver": "^5.3.0",
78
"sleep-promise": "^2.0.0"
@@ -13,7 +14,7 @@
1314
"private": true,
1415
"scripts": {
1516
"postinstall": "npm run pkgcheck && npm run bootstrap",
16-
"bootstrap": "lerna bootstrap",
17+
"bootstrap": "git submodule init && git submodule update && lerna bootstrap",
1718
"test": "lerna run test",
1819
"scanlicenses": "./scripts/scan-all-licenses.sh",
1920
"pkgcheck": "node ./scripts/pkgcheck.js",

packages/composer-common/lib/introspect/modelfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class ModelFile {
5151
this.fileName = 'UNKNOWN';
5252

5353
if(!definitions || typeof definitions !== 'string') {
54-
throw new Error('ModelFile expects a Concerto model as a string as input.');
54+
throw new Error('ModelFile expects a Composer model as a string as input.');
5555
}
5656
this.definitions = definitions;
5757

packages/composer-playground-api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"doc": "jsdoc --pedantic --recurse -c jsdoc.conf -t ./node_modules/ink-docstrap/template",
1818
"postdoc": "npm run lint",
1919
"lint": "eslint .",
20+
"start": "node cli.js",
2021
"test": "mocha --recursive && istanbul cover --include-all-sources --report cobertura --report html ./node_modules/mocha/bin/_mocha -- --recursive",
2122
"posttest": "istanbul check-coverage"
2223
},
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/

packages/composer-rest-server/server/server.js

100644100755
Lines changed: 68 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env node
22
/*
3-
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* Licensed under the Apache License, Version 2.0 (the 'License');
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
66
*
77
* http://www.apache.org/licenses/LICENSE-2.0
88
*
99
* Unless required by applicable law or agreed to in writing, software
10-
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* distributed under the License is distributed on an 'AS IS' BASIS,
1111
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
* See the License for the specific language governing permissions and
1313
* limitations under the License.
@@ -19,11 +19,11 @@ const chalk = require('chalk');
1919
const clear = require('clear');
2020
const figlet = require('figlet');
2121
const util = require('../lib/util');
22-
2322
const loopback = require('loopback');
2423
const boot = require('loopback-boot');
25-
2624
const app = module.exports = loopback();
25+
process.env.SUPPRESS_NO_CONFIG_WARNING = true;
26+
2727
app.start = function() {
2828

2929
// start the web server
@@ -37,41 +37,70 @@ app.start = function() {
3737
});
3838
};
3939

40-
// clear the console and display a nice welcome message
41-
clear();
42-
console.log(
43-
chalk.yellow(
44-
figlet.textSync('Fabric-Composer', { horizontalLayout: 'full' })
45-
)
46-
);
4740

48-
// Get details of the server that we want to run
49-
util.getFabricDetails(function(answers) {
50-
// augment the app with the extra config that we've just collected
51-
let ds = {
52-
'name' : 'Composer', // not sure this matters
53-
'connectionProfileName' : answers.profilename,
54-
'businessNetworkIdentifier' : answers.businessNetworkId,
55-
'participantId' : answers.userid,
56-
'participantPwd' : answers.secret
57-
};
58-
app.cfg = ds;
59-
boot(app, __dirname, function(err) {
60-
if(err) {
61-
throw err;
62-
}
63-
64-
// start the server if `$ node server.js`
65-
if (require.main === module) {
66-
app.start();
67-
}
41+
const yargs = require( 'yargs' )
42+
.wrap(null)
43+
.usage( 'Usage: $0 -p connection profile -b business network identifier -u participant id -s participant password' )
44+
.option( 'c', { alias: 'connectionProfile', describe: 'connection profile Name', type: 'string' } )
45+
.option( 'b', { alias: 'businessNetwork', describe: 'business network identifier', type: 'string' } )
46+
.option( 'i', { alias: 'participantId', describe: 'participant id', type: 'string' } )
47+
.option( 'p', { alias: 'participantPwd', describe: 'participant password', type: 'string' } )
48+
.help( 'h' )
49+
.alias( 'h', 'help' )
50+
.argv;
51+
52+
// see if we need to run interactively
53+
if(yargs.c === undefined && yargs.b === undefined && yargs.i === undefined && yargs.p === undefined) {
54+
// Gather some args interactively
55+
clear();
56+
console.log(
57+
chalk.yellow(
58+
figlet.textSync('Fabric-Composer', { horizontalLayout: 'full' })
59+
)
60+
);
61+
// Get details of the server that we want to run
62+
util.getFabricDetails(function(answers) {
63+
// augment the app with the extra config that we've just collected
64+
let ds = {
65+
'name' : 'Composer', // not sure this matters
66+
'connectionProfileName' : answers.profilename,
67+
'businessNetworkIdentifier' : answers.businessNetworkId,
68+
'participantId' : answers.userid,
69+
'participantPwd' : answers.secret
70+
};
71+
app.cfg = ds;
72+
boot(app, __dirname, function(err) {
73+
if(err) {
74+
throw err;
75+
}
76+
// start the server if `$ node server.js`
77+
if (require.main === module) {
78+
app.start();
79+
}
80+
});
6881
});
69-
});
70-
71-
72-
73-
74-
75-
76-
7782

83+
} else {
84+
// make sure we have args for all required parms otherwise error
85+
if(yargs.c === undefined || yargs.b === undefined || yargs.i === undefined || yargs.p === undefined) {
86+
console.log('Error: Missing parameter. Please run compposer-rest-server -h to see usage details');
87+
} else {
88+
let ds = {
89+
'name' : 'Composer', // not sure this matters
90+
'connectionProfileName' : yargs.c,
91+
'businessNetworkIdentifier' : yargs.b,
92+
'participantId' : yargs.i,
93+
'participantPwd' : yargs.p
94+
};
95+
app.cfg = ds;
96+
boot(app, __dirname, function(err) {
97+
if(err) {
98+
throw err;
99+
}
100+
// start the server if `$ node server.js`
101+
if (require.main === module) {
102+
app.start();
103+
}
104+
});
105+
}
106+
}

packages/composer-website/jekylldocs/tasks/genapp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ npm install -g typings
3030

3131
npm install -g bower
3232

33-
npm install -g angular-cli
33+
npm install -g @angular/cli
3434
```
3535

3636

packages/generator-fabric-composer/generators/angular/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ module.exports = yeoman.Base.extend({
382382
assetList.forEach((asset) => {
383383
assetComponentNames.push(asset.name+'Component');
384384
});
385-
385+
386386
let model = self._generateTemplateModel();
387387
self.fs.copyTpl(self.templatePath('**/!(node_modules|typings|asset|Transaction)*'), self.destinationPath(), model);
388388

@@ -424,6 +424,11 @@ module.exports = yeoman.Base.extend({
424424
let parameters = {};
425425
parameters.fileWriter = new FileWriter(self.destinationPath()+'/src/app');
426426
modelManager.accept(visitor, parameters);
427+
428+
429+
assetList = [];
430+
assetComponentNames = [];
431+
assetServiceNames = [];
427432
}
428433

429434

@@ -455,7 +460,7 @@ module.exports = yeoman.Base.extend({
455460
enrollmentSecret: this.enrollmentSecret
456461
};
457462
},
458-
463+
459464
end: function() {
460465
console.log('Complete');
461466
}

0 commit comments

Comments
 (0)