Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SUPPORTED_FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ This document provides an overview of Fablo features. The table below tracks fea
**Supported Fabric versions:**

Fabric v2 = 2.5.12<br>
Fabric v3 = 3.0.0
Fabric v3 = 3.1.0

**Legend:**

Expand Down
21 changes: 21 additions & 0 deletions src/init/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,27 @@ export default class InitGenerator extends Generator {
return acc;
}, {} as Record<string, true>);

if (flags.ccaas) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (flags.ccaas) {
if (flags.ccaas) {
if (flags.dev || flags.node) { throw ....

if (flags.dev || flags.node){
this.log(chalk.red("Error: --ccaas flag cannot be used together with --dev or --node flags"));
process.exit(1);
}
console.log("Creating sample CCAAS chaincode");

const chaincodeConfig: ChaincodeJson = {
name: "chaincode1",
version: "0.0.1",
channel: "my-channel1",
lang: "ccaas",
image: "hyperledger/fabric-ccaasenv:${FABRIC_CCAASENV_VERSION:-2.5}",
privateData: [],
};
fabloConfigJson = {
...fabloConfigJson,
chaincodes: [...fabloConfigJson.chaincodes, chaincodeConfig],
};
}

if (flags.node) {
console.log("Creating sample Node.js chaincode");
this.fs.copy(this.templatePath("chaincodes"), this.destinationPath("chaincodes"));
Expand Down
Loading