From 0e35c81882bd2296436831208fd91f22f6019b95 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Jul 2023 01:54:30 +0000 Subject: [PATCH 01/83] Bump word-wrap in /samples/chaincodes/chaincode-kv-node Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.4) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] --- samples/chaincodes/chaincode-kv-node/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/chaincodes/chaincode-kv-node/package-lock.json b/samples/chaincodes/chaincode-kv-node/package-lock.json index 1e9ef16b..260f4a1f 100644 --- a/samples/chaincodes/chaincode-kv-node/package-lock.json +++ b/samples/chaincodes/chaincode-kv-node/package-lock.json @@ -6940,9 +6940,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", + "integrity": "sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==", "dev": true }, "wrap-ansi": { From 1d85fdcd7535e96f7ed2638f970da334c42041e9 Mon Sep 17 00:00:00 2001 From: Piotr Hejwowski Date: Wed, 30 Aug 2023 13:03:03 +0200 Subject: [PATCH 02/83] Update CHANGELOG.md Signed-off-by: Piotr Hejwowski --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8bf47d4..da340688 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,21 @@ ## 1.2.0-unstable ### Features -* Initial support for Kubernetes * Basic support for chaincode invoke command ### Fixes * Remove unsupported test library and dependencies * Updated Node.js version from 12 to 16 in chaincode +## 1.2.0 +### Features +* Initial Kubernetes support [#351](https://github.com/hyperledger-labs/fablo/issues/351) +(not yet so elastic like Fablo in terms of network topology, but ready for first views and comments7) + +### Chore & Maintenance +* Library updates + + ## 1.1.0 ### Features From b9817e0a12acde87526eccf8b0cc10941cbe6882 Mon Sep 17 00:00:00 2001 From: Piotr Hejwowski Date: Wed, 30 Aug 2023 13:07:46 +0200 Subject: [PATCH 03/83] Update CHANGELOG.md7 Signed-off-by: Piotr Hejwowski --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da340688..e7a71ad5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ## 1.2.0 ### Features * Initial Kubernetes support [#351](https://github.com/hyperledger-labs/fablo/issues/351) -(not yet so elastic like Fablo in terms of network topology, but ready for first views and comments7) +(not yet so elastic like Fablo in terms of network topology, but ready for first views and comments) ### Chore & Maintenance * Library updates From ae92131c98b0453181734e67d9f166ee7d352c01 Mon Sep 17 00:00:00 2001 From: jnjerin Date: Fri, 1 Sep 2023 14:31:54 +0300 Subject: [PATCH 04/83] Implemented support for chaincode list command Signed-off-by: jnjerin --- e2e-network/docker/test-01-simple.sh | 6 ++--- e2e-network/docker/wait-for-chaincode.sh | 22 +++++++++---------- src/setup-docker/templates/fabric-docker.sh | 2 ++ .../fabric-docker/chaincode-scripts.sh | 22 +++++++++++++++++++ .../scripts/chaincode-functions-v2.sh | 18 +++++++++++++++ 5 files changed, 55 insertions(+), 15 deletions(-) diff --git a/e2e-network/docker/test-01-simple.sh b/e2e-network/docker/test-01-simple.sh index 6ade56a4..b6cf9259 100755 --- a/e2e-network/docker/test-01-simple.sh +++ b/e2e-network/docker/test-01-simple.sh @@ -32,7 +32,7 @@ waitForContainer() { } waitForChaincode() { - sh "$TEST_TMP/../wait-for-chaincode.sh" "$1" "$2" "$3" "$4" "$5" + (cd "$TEST_TMP" && sh ../wait-for-chaincode.sh "$1" "$2" "$3" "$4") } expectInvoke() { @@ -81,8 +81,8 @@ expectCommand "(cd \"$TEST_TMP\" && \"$FABLO_HOME/fablo.sh\" channel getinfo my- # Reset and ensure the state is lost after reset (cd "$TEST_TMP" && "$FABLO_HOME/fablo.sh" reset) -waitForChaincode "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" -waitForChaincode "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "0.0.1" +waitForChaincode "peer0.org1.example.com" "my-channel1" "chaincode1" "0.0.1" +waitForChaincode "peer1.org1.example.com" "my-channel1" "chaincode1" "0.0.1" expectInvoke "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" \ '{"Args":["KVContract:get", "name"]}' \ '{\"error\":\"NOT_FOUND\"}' diff --git a/e2e-network/docker/wait-for-chaincode.sh b/e2e-network/docker/wait-for-chaincode.sh index 7cba57ff..676c44fd 100755 --- a/e2e-network/docker/wait-for-chaincode.sh +++ b/e2e-network/docker/wait-for-chaincode.sh @@ -1,34 +1,32 @@ #!/usr/bin/env bash -cli=$1 -peer=$2 -channel=$3 -chaincode=$4 -version=$5 +peer=$1 +channel=$2 +chaincode=$3 +version=$4 search_string="Name: $chaincode, Version: $version" if [ -z "$version" ]; then - echo "Usage: ./wait-for-chaincode.sh [cli] [peer:port] [channel] [chaincode] [version]" + echo "Usage: ./wait-for-chaincode.sh [peer:port] [channel] [chaincode] [version]" exit 1 fi listChaincodes() { - docker exec -e CORE_PEER_ADDRESS="$peer" "$cli" peer lifecycle chaincode querycommitted \ - --channelID "$channel" + "$FABLO_HOME/fablo.sh" chaincodes list "$peer" "$channel" } for i in $(seq 1 90); do - echo "➜ verifying if chaincode ($chaincode/$version) is committed on $channel/$cli/$peer ($i)..." + echo "➜ verifying if chaincode ($chaincode/$version) is committed on $channel/$peer ($i)..." if listChaincodes 2>&1 | grep "$search_string"; then - echo "✅ ok: Chaincode $chaincode/$version is ready on $channel/$cli/$peer!" + echo "✅ ok: Chaincode $chaincode/$version is ready on $channel/$peer!" exit 0 - else + else sleep 1 fi done #timeout -echo "❌ failed: Failed to verify chaincode $chaincode/$version on $channel/$cli/$peer" +echo "❌ failed: Failed to verify chaincode $chaincode/$version on $channel/$peer" listChaincodes exit 1 diff --git a/src/setup-docker/templates/fabric-docker.sh b/src/setup-docker/templates/fabric-docker.sh index 11989286..20a11e9d 100755 --- a/src/setup-docker/templates/fabric-docker.sh +++ b/src/setup-docker/templates/fabric-docker.sh @@ -45,6 +45,8 @@ elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then runDevModeChaincode "$3" "$4" elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" elif [ "$1" = "channel" ]; then channelQuery "${@:2}" elif [ "$1" = "snapshot" ]; then diff --git a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh index 50acc101..ec3ea5fd 100755 --- a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh +++ b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh @@ -50,3 +50,25 @@ fi --waitForEventTimeout 90s \ 2>&1 } + + +chaincodeList() { + echo " chaincodeList $1 $2 " + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $@" + exit 1 + <% orgs.forEach((org) => { org.peers.forEach((peer) => { %> + elif [ "$1" = "<%= peer.address %>" ]; then + <% if(!global.tls) { %> + peerChaincodeList "<%= org.cli.address %>" "<%= peer.fullAddress %>" "$2" # $2 is channel name + <% } else { %> + peerChaincodeListTls "<%= org.cli.address %>" "<%= peer.fullAddress %>" "$2" "crypto-orderer/tlsca.<%= ordererGroups[0].ordererHeads[0].domain %>-cert.pem" # Third argument is channel name + <% } %> + <% })}) %> + else + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" + exit 1 + + fi +} + diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index 0091804a..e7f0838f 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -292,3 +292,21 @@ chaincodeCommit() { "${TLS_ROOT_CERT_PARAMS[@]+"${TLS_ROOT_CERT_PARAMS[@]}"}" \ "${CA_CERT_PARAMS[@]+"${CA_CERT_PARAMS[@]}"}" } + +peerChaincodeList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + + echo "Listing chaincodes for peer $PEER_ADDRESS on channel $CHANNEL_NAME..." + + # Execute the command to list chaincodes + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \ + --channelID "$CHANNEL_NAME" +} + +peerChaincodeListTls() { + echo "Chaincode list with TLS is not supported yet" + exit 1 +} + From 5b1177ff4f25aa737fec365ce035f704361ce329 Mon Sep 17 00:00:00 2001 From: jnjerin Date: Fri, 1 Sep 2023 14:41:34 +0300 Subject: [PATCH 05/83] update snapshots Signed-off-by: jnjerin --- ...-1chaincode-private-data.json.test.ts.snap | 32 +++++++++ ...1.4-1org-1chaincode-raft.json.test.ts.snap | 26 +++++++ ...-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 38 +++++++++++ ...2chaincodes-private-data.yaml.test.ts.snap | 32 +++++++++ ...4-2orgs-2chaincodes-raft.json.test.ts.snap | 38 +++++++++++ ...1chaincode-raft-explorer.json.test.ts.snap | 37 ++++++++++ ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 43 ++++++++++++ ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 55 +++++++++++++++ ...1chaincode-raft-explorer.json.test.ts.snap | 67 +++++++++++++++++++ 9 files changed, 368 insertions(+) diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index ab24ec7b..23936702 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -2063,6 +2063,8 @@ elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then runDevModeChaincode \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"channel\\" ]; then channelQuery \\"\${@:2}\\" elif [ \\"$1\\" = \\"snapshot\\" ]; then @@ -2176,6 +2178,36 @@ chaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } + +chaincodeList() { + echo \\" chaincodeList $1 $2 \\" + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + then + + peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index 7d923fc8..ec9b6ddf 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -1474,6 +1474,8 @@ elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then runDevModeChaincode \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"channel\\" ]; then channelQuery \\"\${@:2}\\" elif [ \\"$1\\" = \\"snapshot\\" ]; then @@ -1581,6 +1583,30 @@ chaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } + +chaincodeList() { + echo \\" chaincodeList $1 $2 \\" + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index 3929867b..8a33090f 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -2089,6 +2089,8 @@ elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then runDevModeChaincode \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"channel\\" ]; then channelQuery \\"\${@:2}\\" elif [ \\"$1\\" = \\"snapshot\\" ]; then @@ -2205,6 +2207,42 @@ chaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } + +chaincodeList() { + echo \\" chaincodeList $1 $2 \\" + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + then + + peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer1.org2.example.com\\" ] + then + + peerChaincodeList \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"$2\\" # $2 is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index 8d3d0ccc..ad2a27e3 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -2070,6 +2070,8 @@ elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then runDevModeChaincode \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"channel\\" ]; then channelQuery \\"\${@:2}\\" elif [ \\"$1\\" = \\"snapshot\\" ]; then @@ -2183,6 +2185,36 @@ chaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } + +chaincodeList() { + echo \\" chaincodeList $1 $2 \\" + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + then + + peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index 85c28e18..f0e32b2b 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -2260,6 +2260,8 @@ elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then runDevModeChaincode \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"channel\\" ]; then channelQuery \\"\${@:2}\\" elif [ \\"$1\\" = \\"snapshot\\" ]; then @@ -2376,6 +2378,42 @@ chaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } + +chaincodeList() { + echo \\" chaincodeList $1 $2 \\" + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org2.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 280ce448..9fa30658 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1501,6 +1501,8 @@ elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then runDevModeChaincode \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"channel\\" ]; then channelQuery \\"\${@:2}\\" elif [ \\"$1\\" = \\"snapshot\\" ]; then @@ -1605,6 +1607,24 @@ chaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } + +chaincodeList() { + echo \\" chaincodeList $1 $2 \\" + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} " `; @@ -2742,6 +2762,23 @@ chaincodeCommit() { \\"\${TLS_ROOT_CERT_PARAMS[@]+\\"\${TLS_ROOT_CERT_PARAMS[@]}\\"}\\" \\\\ \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" } + +peerChaincodeList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + + echo \\"Listing chaincodes for peer $PEER_ADDRESS on channel $CHANNEL_NAME...\\" + + # Execute the command to list chaincodes + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ + --channelID \\"$CHANNEL_NAME\\" +} + +peerChaincodeListTls() { + echo \\"Chaincode list with TLS is not supported yet\\" + exit 1 +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index d22b3636..7d10f91e 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1411,6 +1411,8 @@ elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then runDevModeChaincode \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"channel\\" ]; then channelQuery \\"\${@:2}\\" elif [ \\"$1\\" = \\"snapshot\\" ]; then @@ -1518,6 +1520,30 @@ chaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } + +chaincodeList() { + echo \\" chaincodeList $1 $2 \\" + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} " `; @@ -2614,6 +2640,23 @@ chaincodeCommit() { \\"\${TLS_ROOT_CERT_PARAMS[@]+\\"\${TLS_ROOT_CERT_PARAMS[@]}\\"}\\" \\\\ \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" } + +peerChaincodeList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + + echo \\"Listing chaincodes for peer $PEER_ADDRESS on channel $CHANNEL_NAME...\\" + + # Execute the command to list chaincodes + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ + --channelID \\"$CHANNEL_NAME\\" +} + +peerChaincodeListTls() { + echo \\"Chaincode list with TLS is not supported yet\\" + exit 1 +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 4272877b..22aaa5d9 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -2998,6 +2998,8 @@ elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then runDevModeChaincode \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"channel\\" ]; then channelQuery \\"\${@:2}\\" elif [ \\"$1\\" = \\"snapshot\\" ]; then @@ -3117,6 +3119,42 @@ chaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } + +chaincodeList() { + echo \\" chaincodeList $1 $2 \\" + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org2.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" # Third argument is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} " `; @@ -4913,6 +4951,23 @@ chaincodeCommit() { \\"\${TLS_ROOT_CERT_PARAMS[@]+\\"\${TLS_ROOT_CERT_PARAMS[@]}\\"}\\" \\\\ \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" } + +peerChaincodeList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + + echo \\"Listing chaincodes for peer $PEER_ADDRESS on channel $CHANNEL_NAME...\\" + + # Execute the command to list chaincodes + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ + --channelID \\"$CHANNEL_NAME\\" +} + +peerChaincodeListTls() { + echo \\"Chaincode list with TLS is not supported yet\\" + exit 1 +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 54f3580a..35546706 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -3293,6 +3293,8 @@ elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then runDevModeChaincode \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" elif [ \\"$1\\" = \\"channel\\" ]; then channelQuery \\"\${@:2}\\" elif [ \\"$1\\" = \\"snapshot\\" ]; then @@ -3418,6 +3420,54 @@ chaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } + +chaincodeList() { + echo \\" chaincodeList $1 $2 \\" + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org2.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer0.org3.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org3.example.com\\" \\"peer0.org3.example.com:7081\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org3.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org3.example.com\\" \\"peer1.org3.example.com:7082\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} " `; @@ -5400,6 +5450,23 @@ chaincodeCommit() { \\"\${TLS_ROOT_CERT_PARAMS[@]+\\"\${TLS_ROOT_CERT_PARAMS[@]}\\"}\\" \\\\ \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" } + +peerChaincodeList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + + echo \\"Listing chaincodes for peer $PEER_ADDRESS on channel $CHANNEL_NAME...\\" + + # Execute the command to list chaincodes + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ + --channelID \\"$CHANNEL_NAME\\" +} + +peerChaincodeListTls() { + echo \\"Chaincode list with TLS is not supported yet\\" + exit 1 +} " `; From c871b34fd9b8c5b55e377fd2ab1e78f51d9d9033 Mon Sep 17 00:00:00 2001 From: jnjerin Date: Fri, 1 Sep 2023 14:52:40 +0300 Subject: [PATCH 06/83] update CHANGELOG with chaincode list command feature Signed-off-by: jnjerin --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8bf47d4..5e1377fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features * Initial support for Kubernetes * Basic support for chaincode invoke command +* Support for `chaincodes list command` ### Fixes * Remove unsupported test library and dependencies From 64a217867721149f29e39922712f14ac4ae8961d Mon Sep 17 00:00:00 2001 From: jnjerin Date: Fri, 1 Sep 2023 15:10:02 +0300 Subject: [PATCH 07/83] update bash to solve syntax error Signed-off-by: jnjerin --- src/setup-docker/templates/fabric-docker/chaincode-scripts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh index ec3ea5fd..fd1df56f 100755 --- a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh +++ b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh @@ -55,7 +55,7 @@ fi chaincodeList() { echo " chaincodeList $1 $2 " if [ "$#" -ne 2 ]; then - echo "Expected 2 parameters for chaincode list, but got: $@" + echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 <% orgs.forEach((org) => { org.peers.forEach((peer) => { %> elif [ "$1" = "<%= peer.address %>" ]; then From 2b050cc8004bda1739e18b6631446554e6dfea66 Mon Sep 17 00:00:00 2001 From: jnjerin Date: Fri, 1 Sep 2023 15:34:09 +0300 Subject: [PATCH 08/83] Update script to log chaincodes list Signed-off-by: jnjerin --- e2e-network/docker/wait-for-chaincode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e-network/docker/wait-for-chaincode.sh b/e2e-network/docker/wait-for-chaincode.sh index 676c44fd..d0995740 100755 --- a/e2e-network/docker/wait-for-chaincode.sh +++ b/e2e-network/docker/wait-for-chaincode.sh @@ -17,8 +17,8 @@ listChaincodes() { for i in $(seq 1 90); do echo "➜ verifying if chaincode ($chaincode/$version) is committed on $channel/$peer ($i)..." - if listChaincodes 2>&1 | grep "$search_string"; then + listChaincodes echo "✅ ok: Chaincode $chaincode/$version is ready on $channel/$peer!" exit 0 else From 9f1a3c41d81ff18d33d4403fb63f699ce5806133 Mon Sep 17 00:00:00 2001 From: jnjerin Date: Fri, 1 Sep 2023 15:40:21 +0300 Subject: [PATCH 09/83] update snapshots Signed-off-by: jnjerin --- ...g-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap | 2 +- ...blo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap | 2 +- .../fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 2 +- ...-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap | 2 +- ...o-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap | 2 +- ...fig-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap | 6 ++++-- .../fablo-config-hlf2-1org-1chaincode.json.test.ts.snap | 6 ++++-- ...blo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 6 ++++-- ...ig-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap | 6 ++++-- .../fabric-docker/scripts/chaincode-functions-v2.sh | 4 +++- 10 files changed, 24 insertions(+), 14 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index 23936702..77a05fd5 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -2182,7 +2182,7 @@ chaincodeInvoke() { chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index ec9b6ddf..4d77b3f0 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -1587,7 +1587,7 @@ chaincodeInvoke() { chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index 8a33090f..dd13f1b8 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -2211,7 +2211,7 @@ chaincodeInvoke() { chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index ad2a27e3..d2d07c04 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -2189,7 +2189,7 @@ chaincodeInvoke() { chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index f0e32b2b..91456608 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -2382,7 +2382,7 @@ chaincodeInvoke() { chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 9fa30658..327a13bf 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1611,7 +1611,7 @@ chaincodeInvoke() { chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then @@ -2768,7 +2768,9 @@ peerChaincodeList() { local PEER_ADDRESS=$2 local CHANNEL_NAME=$3 - echo \\"Listing chaincodes for peer $PEER_ADDRESS on channel $CHANNEL_NAME...\\" + echo \\"Chaincodes list:\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" # Execute the command to list chaincodes docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 7d10f91e..05f9d766 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1524,7 +1524,7 @@ chaincodeInvoke() { chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then @@ -2646,7 +2646,9 @@ peerChaincodeList() { local PEER_ADDRESS=$2 local CHANNEL_NAME=$3 - echo \\"Listing chaincodes for peer $PEER_ADDRESS on channel $CHANNEL_NAME...\\" + echo \\"Chaincodes list:\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" # Execute the command to list chaincodes docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 22aaa5d9..95e45a94 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -3123,7 +3123,7 @@ chaincodeInvoke() { chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then @@ -4957,7 +4957,9 @@ peerChaincodeList() { local PEER_ADDRESS=$2 local CHANNEL_NAME=$3 - echo \\"Listing chaincodes for peer $PEER_ADDRESS on channel $CHANNEL_NAME...\\" + echo \\"Chaincodes list:\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" # Execute the command to list chaincodes docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 35546706..3232dcab 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -3424,7 +3424,7 @@ chaincodeInvoke() { chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $@\\" + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then @@ -5456,7 +5456,9 @@ peerChaincodeList() { local PEER_ADDRESS=$2 local CHANNEL_NAME=$3 - echo \\"Listing chaincodes for peer $PEER_ADDRESS on channel $CHANNEL_NAME...\\" + echo \\"Chaincodes list:\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" # Execute the command to list chaincodes docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index e7f0838f..2af77272 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -298,7 +298,9 @@ peerChaincodeList() { local PEER_ADDRESS=$2 local CHANNEL_NAME=$3 - echo "Listing chaincodes for peer $PEER_ADDRESS on channel $CHANNEL_NAME..." + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" # Execute the command to list chaincodes docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \ From 47080f2e16d095c066efe2af326a661e9d5f159f Mon Sep 17 00:00:00 2001 From: jnjerin Date: Mon, 11 Sep 2023 15:50:00 +0300 Subject: [PATCH 10/83] created support for chaincodes list command (with TLS) Signed-off-by: jnjerin --- e2e-network/docker/test-02-raft-2orgs.sh | 20 ++++--- e2e-network/docker/wait-for-chaincode-tls.sh | 60 +++++++++---------- .../scripts/chaincode-functions-v2.sh | 22 ++++++- 3 files changed, 61 insertions(+), 41 deletions(-) diff --git a/e2e-network/docker/test-02-raft-2orgs.sh b/e2e-network/docker/test-02-raft-2orgs.sh index b9fdf939..916bc8dc 100755 --- a/e2e-network/docker/test-02-raft-2orgs.sh +++ b/e2e-network/docker/test-02-raft-2orgs.sh @@ -6,6 +6,8 @@ TEST_TMP="$(rm -rf "$0.tmpdir" && mkdir -p "$0.tmpdir" && (cd "$0.tmpdir" && pwd TEST_LOGS="$(mkdir -p "$0.logs" && (cd "$0.logs" && pwd))" FABLO_HOME="$TEST_TMP/../../.." +export FABLO_HOME + CONFIG="$FABLO_HOME/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml" networkUp() { @@ -33,7 +35,7 @@ waitForContainer() { } waitForChaincode() { - sh "$TEST_TMP/../wait-for-chaincode-tls.sh" "$1" "$2" "$3" "$4" "$5" + (cd "$TEST_TMP" && sh ../wait-for-chaincode.sh "$1" "$2" "$3" "$4") } expectInvokeRest() { @@ -82,10 +84,10 @@ waitForContainer "peer1.org2.example.com" "Anchor peer for channel my-channel2 w waitForContainer "peer1.org2.example.com" "Membership view has changed. peers went online:.*peer1.org1.example.com:7062" # check if chaincodes are instantiated on peers -waitForChaincode "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "0.0.1" -waitForChaincode "cli.org2.example.com" "peer0.org2.example.com:7081" "my-channel1" "chaincode1" "0.0.1" -waitForChaincode "cli.org1.example.com" "peer1.org1.example.com:7062" "my-channel2" "chaincode2" "0.0.1" -waitForChaincode "cli.org2.example.com" "peer1.org2.example.com:7082" "my-channel2" "chaincode2" "0.0.1" +waitForChaincode "peer0.org1.example.com" "my-channel1" "chaincode1" "0.0.1" +waitForChaincode "peer0.org2.example.com" "my-channel1" "chaincode1" "0.0.1" +waitForChaincode "peer1.org1.example.com" "my-channel2" "chaincode2" "0.0.1" +waitForChaincode "peer1.org2.example.com" "my-channel2" "chaincode2" "0.0.1" fablo_rest_org1="localhost:8802" @@ -107,13 +109,13 @@ expectInvokeCli "cli.org2.example.com" "peer1.org2.example.com:7082" "my-channel # restart the network and wait for chaincodes (cd "$TEST_TMP" && "$FABLO_HOME/fablo.sh" stop && "$FABLO_HOME/fablo.sh" start) -waitForChaincode "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "0.0.1" -waitForChaincode "cli.org2.example.com" "peer0.org2.example.com:7081" "my-channel1" "chaincode1" "0.0.1" +waitForChaincode "peer0.org1.example.com" "my-channel1" "chaincode1" "0.0.1" +waitForChaincode "peer0.org2.example.com" "my-channel1" "chaincode1" "0.0.1" # upgrade chaincode (cd "$TEST_TMP" && "$FABLO_HOME/fablo.sh" chaincode upgrade "chaincode1" "0.0.2") -waitForChaincode "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "0.0.2" -waitForChaincode "cli.org2.example.com" "peer0.org2.example.com:7081" "my-channel1" "chaincode1" "0.0.2" +waitForChaincode "peer0.org1.example.com" "my-channel1" "chaincode1" "0.0.2" +waitForChaincode "peer0.org2.example.com" "my-channel1" "chaincode1" "0.0.2" # check if state is kept after update expectInvokeRest "$fablo_rest_org1" "my-channel1" "chaincode1" \ diff --git a/e2e-network/docker/wait-for-chaincode-tls.sh b/e2e-network/docker/wait-for-chaincode-tls.sh index dbb3f55b..b16478fc 100755 --- a/e2e-network/docker/wait-for-chaincode-tls.sh +++ b/e2e-network/docker/wait-for-chaincode-tls.sh @@ -1,36 +1,36 @@ -#!/usr/bin/env bash +# #!/usr/bin/env bash -cli=$1 -peer=$2 -channel=$3 -chaincode=$4 -version=$5 -search_string="Name: $chaincode, Version: $version" +# cli=$1 +# peer=$2 +# channel=$3 +# chaincode=$4 +# version=$5 +# search_string="Name: $chaincode, Version: $version" -if [ -z "$version" ]; then - echo "Usage: ./wait-for-chaincode.sh [cli] [peer:port] [channel] [chaincode] [version]" - exit 1 -fi +# if [ -z "$version" ]; then +# echo "Usage: ./wait-for-chaincode.sh [cli] [peer:port] [channel] [chaincode] [version]" +# exit 1 +# fi -listChaincodes() { - docker exec -e CORE_PEER_ADDRESS="$peer" "$cli" peer lifecycle chaincode querycommitted \ - --channelID "$channel" \ - --tls \ - --cafile "/var/hyperledger/cli/crypto-orderer/tlsca.root.com-cert.pem" -} +# listChaincodes() { +# docker exec -e CORE_PEER_ADDRESS="$peer" "$cli" peer lifecycle chaincode querycommitted \ +# --channelID "$channel" \ +# --tls \ +# --cafile "/var/hyperledger/cli/crypto-orderer/tlsca.root.com-cert.pem" +# } -for i in $(seq 1 90); do - echo "➜ verifying if chaincode ($chaincode/$version) is committed on $channel/$cli/$peer ($i)..." +# for i in $(seq 1 90); do +# echo "➜ verifying if chaincode ($chaincode/$version) is committed on $channel/$cli/$peer ($i)..." - if listChaincodes 2>&1 | grep "$search_string"; then - echo "✅ ok: Chaincode $chaincode/$version is ready on $channel/$cli/$peer!" - exit 0 - else - sleep 1 - fi -done +# if listChaincodes 2>&1 | grep "$search_string"; then +# echo "✅ ok: Chaincode $chaincode/$version is ready on $channel/$cli/$peer!" +# exit 0 +# else +# sleep 1 +# fi +# done -#timeout -echo "❌ failed: Failed to verify chaincode $chaincode/$version on $channel/$cli/$peer" -listChaincodes -exit 1 +# #timeout +# echo "❌ failed: Failed to verify chaincode $chaincode/$version on $channel/$cli/$peer" +# listChaincodes +# exit 1 diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index 2af77272..6a24c908 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -307,8 +307,26 @@ peerChaincodeList() { --channelID "$CHANNEL_NAME" } +# peerChaincodeListTls() { +# echo "Chaincode list with TLS is not supported yet" +# exit 1 +# } + peerChaincodeListTls() { - echo "Chaincode list with TLS is not supported yet" - exit 1 + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CA_CERT=$4 + + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CA_CERT: $CA_CERT" + + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \ + --channelID "$CHANNEL_NAME" \ + --tls \ + --cafile "/var/hyperledger/cli/$CA_CERT" } From 5e3a23b90e0bcfb599fb413dd0f32fadff16465d Mon Sep 17 00:00:00 2001 From: jnjerin Date: Mon, 11 Sep 2023 16:54:46 +0300 Subject: [PATCH 11/83] cleanup:Deleted wait-for-chaincode-tls script Signed-off-by: jnjerin --- e2e-network/docker/wait-for-chaincode-tls.sh | 36 ------------------- .../scripts/chaincode-functions-v2.sh | 4 --- 2 files changed, 40 deletions(-) delete mode 100755 e2e-network/docker/wait-for-chaincode-tls.sh diff --git a/e2e-network/docker/wait-for-chaincode-tls.sh b/e2e-network/docker/wait-for-chaincode-tls.sh deleted file mode 100755 index b16478fc..00000000 --- a/e2e-network/docker/wait-for-chaincode-tls.sh +++ /dev/null @@ -1,36 +0,0 @@ -# #!/usr/bin/env bash - -# cli=$1 -# peer=$2 -# channel=$3 -# chaincode=$4 -# version=$5 -# search_string="Name: $chaincode, Version: $version" - -# if [ -z "$version" ]; then -# echo "Usage: ./wait-for-chaincode.sh [cli] [peer:port] [channel] [chaincode] [version]" -# exit 1 -# fi - -# listChaincodes() { -# docker exec -e CORE_PEER_ADDRESS="$peer" "$cli" peer lifecycle chaincode querycommitted \ -# --channelID "$channel" \ -# --tls \ -# --cafile "/var/hyperledger/cli/crypto-orderer/tlsca.root.com-cert.pem" -# } - -# for i in $(seq 1 90); do -# echo "➜ verifying if chaincode ($chaincode/$version) is committed on $channel/$cli/$peer ($i)..." - -# if listChaincodes 2>&1 | grep "$search_string"; then -# echo "✅ ok: Chaincode $chaincode/$version is ready on $channel/$cli/$peer!" -# exit 0 -# else -# sleep 1 -# fi -# done - -# #timeout -# echo "❌ failed: Failed to verify chaincode $chaincode/$version on $channel/$cli/$peer" -# listChaincodes -# exit 1 diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index 6a24c908..0e11d6a0 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -307,10 +307,6 @@ peerChaincodeList() { --channelID "$CHANNEL_NAME" } -# peerChaincodeListTls() { -# echo "Chaincode list with TLS is not supported yet" -# exit 1 -# } peerChaincodeListTls() { local CLI_NAME=$1 From 1abd0fc8a840fa2b9364abdd33d27e30dc329cf4 Mon Sep 17 00:00:00 2001 From: jnjerin Date: Mon, 11 Sep 2023 17:04:26 +0300 Subject: [PATCH 12/83] update CHANGELOG and snapshots Signed-off-by: jnjerin --- CHANGELOG.md | 6 +++--- ...rg-1chaincode-raft-explorer.json.test.ts.snap | 16 ++++++++++++++-- ...config-hlf2-1org-1chaincode.json.test.ts.snap | 16 ++++++++++++++-- ...hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 16 ++++++++++++++-- ...gs-1chaincode-raft-explorer.json.test.ts.snap | 16 ++++++++++++++-- 5 files changed, 59 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e1377fa..9e4045c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,9 @@ ### Features * Initial support for Kubernetes -* Basic support for chaincode invoke command -* Support for `chaincodes list command` - +* Basic support for `chaincode invoke` command +* Support for `chaincodes list` command (tls and non-tls) + ### Fixes * Remove unsupported test library and dependencies * Updated Node.js version from 12 to 16 in chaincode diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 327a13bf..cb37d94a 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -2778,8 +2778,20 @@ peerChaincodeList() { } peerChaincodeListTls() { - echo \\"Chaincode list with TLS is not supported yet\\" - exit 1 + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CA_CERT=$4 + + echo \\"Chaincodes list:\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ + --channelID \\"$CHANNEL_NAME\\" \\\\ + --tls \\\\ + --cafile \\"/var/hyperledger/cli/$CA_CERT\\" } " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 05f9d766..5ac84f3b 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -2656,8 +2656,20 @@ peerChaincodeList() { } peerChaincodeListTls() { - echo \\"Chaincode list with TLS is not supported yet\\" - exit 1 + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CA_CERT=$4 + + echo \\"Chaincodes list:\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ + --channelID \\"$CHANNEL_NAME\\" \\\\ + --tls \\\\ + --cafile \\"/var/hyperledger/cli/$CA_CERT\\" } " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 95e45a94..8b030998 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -4967,8 +4967,20 @@ peerChaincodeList() { } peerChaincodeListTls() { - echo \\"Chaincode list with TLS is not supported yet\\" - exit 1 + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CA_CERT=$4 + + echo \\"Chaincodes list:\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ + --channelID \\"$CHANNEL_NAME\\" \\\\ + --tls \\\\ + --cafile \\"/var/hyperledger/cli/$CA_CERT\\" } " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 3232dcab..6ee33269 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -5466,8 +5466,20 @@ peerChaincodeList() { } peerChaincodeListTls() { - echo \\"Chaincode list with TLS is not supported yet\\" - exit 1 + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CA_CERT=$4 + + echo \\"Chaincodes list:\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ + --channelID \\"$CHANNEL_NAME\\" \\\\ + --tls \\\\ + --cafile \\"/var/hyperledger/cli/$CA_CERT\\" } " `; From 9e69f48e978e05affeee8b11933848b4e26be97b Mon Sep 17 00:00:00 2001 From: jnjerin Date: Tue, 12 Sep 2023 16:01:58 +0300 Subject: [PATCH 13/83] included new changes on chaincodes list with tls on snapshot test Signed-off-by: jnjerin --- e2e-network/docker/test-04-snapshot.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/e2e-network/docker/test-04-snapshot.sh b/e2e-network/docker/test-04-snapshot.sh index a5db68e1..a952d6fa 100755 --- a/e2e-network/docker/test-04-snapshot.sh +++ b/e2e-network/docker/test-04-snapshot.sh @@ -6,6 +6,8 @@ TEST_TMP="$(rm -rf "$0.tmpdir" && mkdir -p "$0.tmpdir" && (cd "$0.tmpdir" && pwd TEST_LOGS="$(mkdir -p "$0.logs" && (cd "$0.logs" && pwd))" FABLO_HOME="$TEST_TMP/../../.." +export FABLO_HOME + CONFIG="$FABLO_HOME/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json" networkUp() { @@ -30,7 +32,7 @@ waitForContainer() { } waitForChaincode() { - sh "$TEST_TMP/../wait-for-chaincode-tls.sh" "$1" "$2" "$3" "$4" "$5" + (cd "$TEST_TMP" && sh ../wait-for-chaincode.sh "$1" "$2" "$3" "$4") } expectInvokeRest() { @@ -55,7 +57,7 @@ waitForContainer "couchdb.peer0.org1.example.com" "Apache CouchDB has started. T waitForContainer "peer0.org1.example.com" "Joining gossip network of channel my-channel1 with 1 organizations" waitForContainer "db.explorer.example.com" "database system is ready to accept connections" "200" waitForContainer "explorer.example.com" "Successfully created channel event hub for \[my-channel1\]" "200" -waitForChaincode "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" +waitForChaincode "peer0.org1.example.com" "my-channel1" "chaincode1" "0.0.1" fablo_rest_org1="localhost:8801" snapshot_name="fablo-snapshot-$(date -u +"%Y%m%d%H%M%S")" @@ -111,7 +113,7 @@ hook_command="perl -i -pe 's/FABRIC_VERSION=2\.3\.3/FABRIC_VERSION=2\.4\.2/g' ./ "$FABLO_HOME/fablo.sh" restore "$snapshot_name" "$hook_command" && "$FABLO_HOME/fablo.sh" start ) -waitForChaincode "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" +waitForChaincode "peer0.org1.example.com" "my-channel1" "chaincode1" "0.0.1" sleep 5 From c2c11ac5d637d2414f813af23b5d5da3b32847c3 Mon Sep 17 00:00:00 2001 From: jnjerin Date: Sun, 17 Sep 2023 23:51:27 +0300 Subject: [PATCH 14/83] Implemented use of generators for functions Signed-off-by: jnjerin --- e2e-network/docker/expect-invoke-cli.sh | 19 ++-- e2e-network/docker/test-01-simple.sh | 10 +- .../fabric-docker/chaincode-scripts.sh | 91 ++++++++----------- .../scripts/chaincode-functions-v2.sh | 37 +++++++- 4 files changed, 89 insertions(+), 68 deletions(-) diff --git a/e2e-network/docker/expect-invoke-cli.sh b/e2e-network/docker/expect-invoke-cli.sh index 9e4ebe55..f2ffcfba 100755 --- a/e2e-network/docker/expect-invoke-cli.sh +++ b/e2e-network/docker/expect-invoke-cli.sh @@ -1,26 +1,25 @@ #!/usr/bin/env bash -cli="$1" -peers="$2" -channel="$3" -chaincode="$4" -command="$5" -expected="$6" +peers="$1" +channel="$2" +chaincode="$3" +command="$4" +expected="$5" transient_default="{}" -transient="${7:-$transient_default}" +transient="${6:-$transient_default}" if [ -z "$expected" ]; then - echo "Usage: ./expect-invoke.sh [cli] [peer:port[,peer:port]] [channel] [chaincode] [command] [expected_substring] [transient_data]" + echo "Usage: ./expect-invoke.sh [peer[,peer]] [channel] [chaincode] [command] [expected_substring] [transient_data]" exit 1 fi -label="Invoke $channel/$cli/$peers $command" +label="Invoke $channel/$peers $command" echo "" echo "➜ testing: $label" response="$( - "$FABLO_HOME/fablo.sh" chaincode invoke "$channel" "$chaincode" "$peers" "$command" "$transient" + "$FABLO_HOME/fablo.sh" chaincode invoke "$peers" "$channel" "$chaincode" "$command" "$transient" )" echo "$response" diff --git a/e2e-network/docker/test-01-simple.sh b/e2e-network/docker/test-01-simple.sh index b6cf9259..1daac214 100755 --- a/e2e-network/docker/test-01-simple.sh +++ b/e2e-network/docker/test-01-simple.sh @@ -36,7 +36,7 @@ waitForChaincode() { } expectInvoke() { - (cd "$TEST_TMP" && sh ../expect-invoke-cli.sh "$1" "$2" "$3" "$4" "$5" "$6" "$7") + (cd "$TEST_TMP" && sh ../expect-invoke-cli.sh "$1" "$2" "$3" "$4" "$5" "$6") } expectCommand() { @@ -60,10 +60,10 @@ waitForContainer "peer1.org1.example.com" "Learning about the configured anchor waitForContainer "peer1.org1.example.com" "Membership view has changed. peers went online:.*peer0.org1.example.com:7041" # Test simple chaincode -expectInvoke "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" \ +expectInvoke "peer0.org1.example.com" "my-channel1" "chaincode1" \ '{"Args":["KVContract:put", "name", "Willy Wonka"]}' \ '{\"success\":\"OK\"}' -expectInvoke "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" \ +expectInvoke "peer1.org1.example.com" "my-channel1" "chaincode1" \ '{"Args":["KVContract:get", "name"]}' \ '{\"success\":\"Willy Wonka\"}' @@ -83,11 +83,11 @@ expectCommand "(cd \"$TEST_TMP\" && \"$FABLO_HOME/fablo.sh\" channel getinfo my- (cd "$TEST_TMP" && "$FABLO_HOME/fablo.sh" reset) waitForChaincode "peer0.org1.example.com" "my-channel1" "chaincode1" "0.0.1" waitForChaincode "peer1.org1.example.com" "my-channel1" "chaincode1" "0.0.1" -expectInvoke "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" \ +expectInvoke "peer0.org1.example.com" "my-channel1" "chaincode1" \ '{"Args":["KVContract:get", "name"]}' \ '{\"error\":\"NOT_FOUND\"}' # Put some data again -expectInvoke "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" \ +expectInvoke "peer0.org1.example.com" "my-channel1" "chaincode1" \ '{"Args":["KVContract:put", "name", "James Bond"]}' \ '{\"success\":\"OK\"}' \ No newline at end of file diff --git a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh index fd1df56f..1ea05772 100755 --- a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh +++ b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh @@ -1,57 +1,5 @@ #!/usr/bin/env bash -# Function to perform chaincode invoke -chaincodeInvoke() { - local CHANNEL="$1" - local CHAINCODE="$2" - local PEERS="$3" - local COMMAND="$4" - local TRANSIENT="$5" - - echo "-> Chaincode invoke:" - inputLog "CHANNEL: $CHANNEL" - inputLog "CHAINCODE: $CHAINCODE" - inputLog "PEERS: $PEERS" - inputLog "COMMAND: $COMMAND" - inputLog "TRANSIENT: $TRANSIENT" - -# Validate the input parameters - if [[ -z $CHANNEL || -z $CHAINCODE || -z $PEERS || -z $COMMAND || -z $TRANSIENT ]]; then - echo "Error: Insufficient arguments provided." - echo "Usage: fablo chaincode invoke " - return 1 - fi - - - PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" - -CLI="" - -<% orgs.forEach((org) => { -%> - <% org.peers.forEach((peer) => { -%> - if [ "$PEERS" = "<%= peer.fullAddress %>" ]; then - CLI="<%= org.cli.address %>" - fi - <% }) -%> -<% }) -%> -if [ -z "$CLI" ]; then - echo "Unknown peer: $PEERS" - exit 1 -fi - -# shellcheck disable=SC2086 - docker exec "$CLI" peer chaincode invoke \ - $PEER_ADDRESSES \ - -C "$CHANNEL" \ - -n "$CHAINCODE" \ - -c "$COMMAND" \ - --transient "$TRANSIENT" \ - --waitForEvent \ - --waitForEventTimeout 90s \ - 2>&1 -} - - chaincodeList() { echo " chaincodeList $1 $2 " if [ "$#" -ne 2 ]; then @@ -72,3 +20,42 @@ chaincodeList() { fi } +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" + exit 1 + fi + cli="" + peer_addresses="" + <% if (!global.tls) { %> + peer_certs="" + <% } %> + <% orgs.forEach((org) => { -%> + <% org.peers.forEach((peer) => { -%> + if [[ "$1" == *"<%= peer.address %>"* ]]; then + cli="<%= org.cli.address %>" + peer_addresses="$peer_addresses,<%= peer.fullAddress %>" + <% if(!global.tls) { %> + peer_certs="$peer_certs,crypto/peers/<%= peer.address %>/tls/ca.crt" + <% } %> + fi + <% }) -%> + <% }) -%> + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" + exit 1 + fi + <% if(!global.tls) { %> + peerChaincodeInvoke "$cli" "${peer_addresses:1}" "$2" "$3" "$4" "$5" + <% } else { %> + peerChaincodeInvokeTls "$cli" "${peer_addresses:1}" "$2" "$3" "$4" "$5" "${peer_certs:1}" + <% } %> +} + diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index 0e11d6a0..30db81de 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -307,7 +307,6 @@ peerChaincodeList() { --channelID "$CHANNEL_NAME" } - peerChaincodeListTls() { local CLI_NAME=$1 local PEER_ADDRESS=$2 @@ -326,3 +325,39 @@ peerChaincodeListTls() { --cafile "/var/hyperledger/cli/$CA_CERT" } +# Function to perform chaincode invoke +peerChaincodeInvoke() { + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" + +# shellcheck disable=SC2086 + docker exec "$CLI" peer chaincode invoke \ + $PEER_ADDRESSES \ + -C "$CHANNEL" \ + -n "$CHAINCODE" \ + -c "$COMMAND" \ + --transient "$TRANSIENT" \ + --waitForEvent \ + --waitForEventTimeout 90s \ + 2>&1 +} + +peerChaincodeInvokeTls () { + echo "chaincode invoke TLS is not yet suppported" + exit 1 +} + From ab7c072ae36da22000df1fe332953967e2d3ec3e Mon Sep 17 00:00:00 2001 From: jnjerin Date: Mon, 18 Sep 2023 00:10:04 +0300 Subject: [PATCH 15/83] update snapshots Signed-off-by: jnjerin --- ...-1chaincode-private-data.json.test.ts.snap | 99 ++++++------ ...1.4-1org-1chaincode-raft.json.test.ts.snap | 83 ++++------ ...-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 109 +++++++------ ...2chaincodes-private-data.yaml.test.ts.snap | 99 ++++++------ ...4-2orgs-2chaincodes-raft.json.test.ts.snap | 99 +++++------- ...1chaincode-raft-explorer.json.test.ts.snap | 111 +++++++------ ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 125 +++++++++------ ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 135 +++++++++------- ...1chaincode-raft-explorer.json.test.ts.snap | 151 +++++++++++------- 9 files changed, 537 insertions(+), 474 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index 77a05fd5..0895c24b 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -2127,58 +2127,6 @@ ORG2_CA_ADMIN_PASSWORD=adminpw exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` "#!/usr/bin/env bash -# Function to perform chaincode invoke -chaincodeInvoke() { - local CHANNEL=\\"$1\\" - local CHAINCODE=\\"$2\\" - local PEERS=\\"$3\\" - local COMMAND=\\"$4\\" - local TRANSIENT=\\"$5\\" - - echo \\"-> Chaincode invoke:\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - # Validate the input parameters - if [[ -z $CHANNEL || -z $CHAINCODE || -z $PEERS || -z $COMMAND || -z $TRANSIENT ]]; then - echo \\"Error: Insufficient arguments provided.\\" - echo \\"Usage: fablo chaincode invoke \\" - return 1 - fi - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - CLI=\\"\\" - - if [ \\"$PEERS\\" = \\"peer0.org1.example.com:7041\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org1.example.com:7042\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer0.org2.example.com:7061\\" ]; then - CLI=\\"cli.org2.example.com\\" - fi - if [ -z \\"$CLI\\" ]; then - echo \\"Unknown peer: $PEERS\\" - exit 1 - fi - - # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - 2>&1 -} - chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then @@ -2208,6 +2156,53 @@ chaincodeList() { fi } + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + peer_certs=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index 4d77b3f0..feb12a0c 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -1535,55 +1535,6 @@ ORG1_CA_ADMIN_PASSWORD=adminpw exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` "#!/usr/bin/env bash -# Function to perform chaincode invoke -chaincodeInvoke() { - local CHANNEL=\\"$1\\" - local CHAINCODE=\\"$2\\" - local PEERS=\\"$3\\" - local COMMAND=\\"$4\\" - local TRANSIENT=\\"$5\\" - - echo \\"-> Chaincode invoke:\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - # Validate the input parameters - if [[ -z $CHANNEL || -z $CHAINCODE || -z $PEERS || -z $COMMAND || -z $TRANSIENT ]]; then - echo \\"Error: Insufficient arguments provided.\\" - echo \\"Usage: fablo chaincode invoke \\" - return 1 - fi - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - CLI=\\"\\" - - if [ \\"$PEERS\\" = \\"peer0.org1.example.com:7041\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org1.example.com:7042\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ -z \\"$CLI\\" ]; then - echo \\"Unknown peer: $PEERS\\" - exit 1 - fi - - # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - 2>&1 -} - chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then @@ -1607,6 +1558,40 @@ chaincodeList() { fi } + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" + +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index dd13f1b8..f080aa7c 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -2153,61 +2153,6 @@ ORG2_CA_ADMIN_PASSWORD=adminpw exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` "#!/usr/bin/env bash -# Function to perform chaincode invoke -chaincodeInvoke() { - local CHANNEL=\\"$1\\" - local CHAINCODE=\\"$2\\" - local PEERS=\\"$3\\" - local COMMAND=\\"$4\\" - local TRANSIENT=\\"$5\\" - - echo \\"-> Chaincode invoke:\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - # Validate the input parameters - if [[ -z $CHANNEL || -z $CHAINCODE || -z $PEERS || -z $COMMAND || -z $TRANSIENT ]]; then - echo \\"Error: Insufficient arguments provided.\\" - echo \\"Usage: fablo chaincode invoke \\" - return 1 - fi - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - CLI=\\"\\" - - if [ \\"$PEERS\\" = \\"peer0.org1.example.com:7041\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org1.example.com:7042\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer0.org2.example.com:7061\\" ]; then - CLI=\\"cli.org2.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org2.example.com:7062\\" ]; then - CLI=\\"cli.org2.example.com\\" - fi - if [ -z \\"$CLI\\" ]; then - echo \\"Unknown peer: $PEERS\\" - exit 1 - fi - - # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - 2>&1 -} - chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then @@ -2243,6 +2188,60 @@ chaincodeList() { fi } + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + peer_certs=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index d2d07c04..d5fb30cd 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -2134,58 +2134,6 @@ ORG2_CA_ADMIN_PASSWORD=adminpw exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` "#!/usr/bin/env bash -# Function to perform chaincode invoke -chaincodeInvoke() { - local CHANNEL=\\"$1\\" - local CHAINCODE=\\"$2\\" - local PEERS=\\"$3\\" - local COMMAND=\\"$4\\" - local TRANSIENT=\\"$5\\" - - echo \\"-> Chaincode invoke:\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - # Validate the input parameters - if [[ -z $CHANNEL || -z $CHAINCODE || -z $PEERS || -z $COMMAND || -z $TRANSIENT ]]; then - echo \\"Error: Insufficient arguments provided.\\" - echo \\"Usage: fablo chaincode invoke \\" - return 1 - fi - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - CLI=\\"\\" - - if [ \\"$PEERS\\" = \\"peer0.org1.example.com:7041\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org1.example.com:7042\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer0.org2.example.com:7061\\" ]; then - CLI=\\"cli.org2.example.com\\" - fi - if [ -z \\"$CLI\\" ]; then - echo \\"Unknown peer: $PEERS\\" - exit 1 - fi - - # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - 2>&1 -} - chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then @@ -2215,6 +2163,53 @@ chaincodeList() { fi } + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + peer_certs=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index 91456608..337ff9a4 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -2324,61 +2324,6 @@ ORG2_CA_ADMIN_PASSWORD=adminpw exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` "#!/usr/bin/env bash -# Function to perform chaincode invoke -chaincodeInvoke() { - local CHANNEL=\\"$1\\" - local CHAINCODE=\\"$2\\" - local PEERS=\\"$3\\" - local COMMAND=\\"$4\\" - local TRANSIENT=\\"$5\\" - - echo \\"-> Chaincode invoke:\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - # Validate the input parameters - if [[ -z $CHANNEL || -z $CHAINCODE || -z $PEERS || -z $COMMAND || -z $TRANSIENT ]]; then - echo \\"Error: Insufficient arguments provided.\\" - echo \\"Usage: fablo chaincode invoke \\" - return 1 - fi - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - CLI=\\"\\" - - if [ \\"$PEERS\\" = \\"peer0.org1.example.com:7041\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org1.example.com:7042\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer0.org2.example.com:7061\\" ]; then - CLI=\\"cli.org2.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org2.example.com:7062\\" ]; then - CLI=\\"cli.org2.example.com\\" - fi - if [ -z \\"$CLI\\" ]; then - echo \\"Unknown peer: $PEERS\\" - exit 1 - fi - - # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - 2>&1 -} - chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then @@ -2414,6 +2359,50 @@ chaincodeList() { fi } + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" + +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index cb37d94a..53359698 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1562,52 +1562,6 @@ ORG1_CA_ADMIN_PASSWORD=adminpw exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "#!/usr/bin/env bash -# Function to perform chaincode invoke -chaincodeInvoke() { - local CHANNEL=\\"$1\\" - local CHAINCODE=\\"$2\\" - local PEERS=\\"$3\\" - local COMMAND=\\"$4\\" - local TRANSIENT=\\"$5\\" - - echo \\"-> Chaincode invoke:\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - # Validate the input parameters - if [[ -z $CHANNEL || -z $CHAINCODE || -z $PEERS || -z $COMMAND || -z $TRANSIENT ]]; then - echo \\"Error: Insufficient arguments provided.\\" - echo \\"Usage: fablo chaincode invoke \\" - return 1 - fi - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - CLI=\\"\\" - - if [ \\"$PEERS\\" = \\"peer0.org1.example.com:7041\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ -z \\"$CLI\\" ]; then - echo \\"Unknown peer: $PEERS\\" - exit 1 - fi - - # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - 2>&1 -} - chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then @@ -1625,6 +1579,35 @@ chaincodeList() { fi } + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" + +} " `; @@ -2793,6 +2776,42 @@ peerChaincodeListTls() { --tls \\\\ --cafile \\"/var/hyperledger/cli/$CA_CERT\\" } + +# Function to perform chaincode invoke +peerChaincodeInvoke() { + local CLI=\\"$1\\" + local PEERS=\\"$2\\" + local CHANNEL=\\"$3\\" + local CHAINCODE=\\"$4\\" + local COMMAND=\\"$5\\" + local TRANSIENT=\\"$6\\" + + echo \\"Chaincode invoke:\\" + inputLog \\"CLI: $CLI\\" + inputLog \\"PEERS: $PEERS\\" + inputLog \\"CHANNEL: $CHANNEL\\" + inputLog \\"CHAINCODE: $CHAINCODE\\" + inputLog \\"COMMAND: $COMMAND\\" + inputLog \\"TRANSIENT: $TRANSIENT\\" + + PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + + # shellcheck disable=SC2086 + docker exec \\"$CLI\\" peer chaincode invoke \\\\ + $PEER_ADDRESSES \\\\ + -C \\"$CHANNEL\\" \\\\ + -n \\"$CHAINCODE\\" \\\\ + -c \\"$COMMAND\\" \\\\ + --transient \\"$TRANSIENT\\" \\\\ + --waitForEvent \\\\ + --waitForEventTimeout 90s \\\\ + 2>&1 +} + +peerChaincodeInvokeTls() { + echo \\"chaincode invoke TLS is not yet suppported\\" + exit 1 +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 5ac84f3b..c196e520 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1472,55 +1472,6 @@ ORG1_CA_ADMIN_PASSWORD=adminpw exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` "#!/usr/bin/env bash -# Function to perform chaincode invoke -chaincodeInvoke() { - local CHANNEL=\\"$1\\" - local CHAINCODE=\\"$2\\" - local PEERS=\\"$3\\" - local COMMAND=\\"$4\\" - local TRANSIENT=\\"$5\\" - - echo \\"-> Chaincode invoke:\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - # Validate the input parameters - if [[ -z $CHANNEL || -z $CHAINCODE || -z $PEERS || -z $COMMAND || -z $TRANSIENT ]]; then - echo \\"Error: Insufficient arguments provided.\\" - echo \\"Usage: fablo chaincode invoke \\" - return 1 - fi - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - CLI=\\"\\" - - if [ \\"$PEERS\\" = \\"peer0.org1.example.com:7041\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org1.example.com:7042\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ -z \\"$CLI\\" ]; then - echo \\"Unknown peer: $PEERS\\" - exit 1 - fi - - # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - 2>&1 -} - chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then @@ -1544,6 +1495,46 @@ chaincodeList() { fi } + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + peer_certs=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + +} " `; @@ -2671,6 +2662,42 @@ peerChaincodeListTls() { --tls \\\\ --cafile \\"/var/hyperledger/cli/$CA_CERT\\" } + +# Function to perform chaincode invoke +peerChaincodeInvoke() { + local CLI=\\"$1\\" + local PEERS=\\"$2\\" + local CHANNEL=\\"$3\\" + local CHAINCODE=\\"$4\\" + local COMMAND=\\"$5\\" + local TRANSIENT=\\"$6\\" + + echo \\"Chaincode invoke:\\" + inputLog \\"CLI: $CLI\\" + inputLog \\"PEERS: $PEERS\\" + inputLog \\"CHANNEL: $CHANNEL\\" + inputLog \\"CHAINCODE: $CHAINCODE\\" + inputLog \\"COMMAND: $COMMAND\\" + inputLog \\"TRANSIENT: $TRANSIENT\\" + + PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + + # shellcheck disable=SC2086 + docker exec \\"$CLI\\" peer chaincode invoke \\\\ + $PEER_ADDRESSES \\\\ + -C \\"$CHANNEL\\" \\\\ + -n \\"$CHAINCODE\\" \\\\ + -c \\"$COMMAND\\" \\\\ + --transient \\"$TRANSIENT\\" \\\\ + --waitForEvent \\\\ + --waitForEventTimeout 90s \\\\ + 2>&1 +} + +peerChaincodeInvokeTls() { + echo \\"chaincode invoke TLS is not yet suppported\\" + exit 1 +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 8b030998..97f631ab 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -3065,61 +3065,6 @@ ORG2_CA_ADMIN_PASSWORD=adminpw exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "#!/usr/bin/env bash -# Function to perform chaincode invoke -chaincodeInvoke() { - local CHANNEL=\\"$1\\" - local CHAINCODE=\\"$2\\" - local PEERS=\\"$3\\" - local COMMAND=\\"$4\\" - local TRANSIENT=\\"$5\\" - - echo \\"-> Chaincode invoke:\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - # Validate the input parameters - if [[ -z $CHANNEL || -z $CHAINCODE || -z $PEERS || -z $COMMAND || -z $TRANSIENT ]]; then - echo \\"Error: Insufficient arguments provided.\\" - echo \\"Usage: fablo chaincode invoke \\" - return 1 - fi - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - CLI=\\"\\" - - if [ \\"$PEERS\\" = \\"peer0.org1.example.com:7061\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org1.example.com:7062\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer0.org2.example.com:7081\\" ]; then - CLI=\\"cli.org2.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org2.example.com:7082\\" ]; then - CLI=\\"cli.org2.example.com\\" - fi - if [ -z \\"$CLI\\" ]; then - echo \\"Unknown peer: $PEERS\\" - exit 1 - fi - - # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - 2>&1 -} - chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then @@ -3155,6 +3100,50 @@ chaincodeList() { fi } + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7061\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7062\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7081\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7082\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" + +} " `; @@ -4982,6 +4971,42 @@ peerChaincodeListTls() { --tls \\\\ --cafile \\"/var/hyperledger/cli/$CA_CERT\\" } + +# Function to perform chaincode invoke +peerChaincodeInvoke() { + local CLI=\\"$1\\" + local PEERS=\\"$2\\" + local CHANNEL=\\"$3\\" + local CHAINCODE=\\"$4\\" + local COMMAND=\\"$5\\" + local TRANSIENT=\\"$6\\" + + echo \\"Chaincode invoke:\\" + inputLog \\"CLI: $CLI\\" + inputLog \\"PEERS: $PEERS\\" + inputLog \\"CHANNEL: $CHANNEL\\" + inputLog \\"CHAINCODE: $CHAINCODE\\" + inputLog \\"COMMAND: $COMMAND\\" + inputLog \\"TRANSIENT: $TRANSIENT\\" + + PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + + # shellcheck disable=SC2086 + docker exec \\"$CLI\\" peer chaincode invoke \\\\ + $PEER_ADDRESSES \\\\ + -C \\"$CHANNEL\\" \\\\ + -n \\"$CHAINCODE\\" \\\\ + -c \\"$COMMAND\\" \\\\ + --transient \\"$TRANSIENT\\" \\\\ + --waitForEvent \\\\ + --waitForEventTimeout 90s \\\\ + 2>&1 +} + +peerChaincodeInvokeTls() { + echo \\"chaincode invoke TLS is not yet suppported\\" + exit 1 +} " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 6ee33269..503ea0d9 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -3360,67 +3360,6 @@ ORG3_CA_ADMIN_PASSWORD=adminpw exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "#!/usr/bin/env bash -# Function to perform chaincode invoke -chaincodeInvoke() { - local CHANNEL=\\"$1\\" - local CHAINCODE=\\"$2\\" - local PEERS=\\"$3\\" - local COMMAND=\\"$4\\" - local TRANSIENT=\\"$5\\" - - echo \\"-> Chaincode invoke:\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - # Validate the input parameters - if [[ -z $CHANNEL || -z $CHAINCODE || -z $PEERS || -z $COMMAND || -z $TRANSIENT ]]; then - echo \\"Error: Insufficient arguments provided.\\" - echo \\"Usage: fablo chaincode invoke \\" - return 1 - fi - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - CLI=\\"\\" - - if [ \\"$PEERS\\" = \\"peer0.org1.example.com:7041\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org1.example.com:7042\\" ]; then - CLI=\\"cli.org1.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer0.org2.example.com:7061\\" ]; then - CLI=\\"cli.org2.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org2.example.com:7062\\" ]; then - CLI=\\"cli.org2.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer0.org3.example.com:7081\\" ]; then - CLI=\\"cli.org3.example.com\\" - fi - if [ \\"$PEERS\\" = \\"peer1.org3.example.com:7082\\" ]; then - CLI=\\"cli.org3.example.com\\" - fi - if [ -z \\"$CLI\\" ]; then - echo \\"Unknown peer: $PEERS\\" - exit 1 - fi - - # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - 2>&1 -} - chaincodeList() { echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then @@ -3468,6 +3407,60 @@ chaincodeList() { fi } + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org3.example.com\\"* ]]; then + cli=\\"cli.org3.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org3.example.com:7081\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org3.example.com\\"* ]]; then + cli=\\"cli.org3.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org3.example.com:7082\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" + +} " `; @@ -5481,6 +5474,42 @@ peerChaincodeListTls() { --tls \\\\ --cafile \\"/var/hyperledger/cli/$CA_CERT\\" } + +# Function to perform chaincode invoke +peerChaincodeInvoke() { + local CLI=\\"$1\\" + local PEERS=\\"$2\\" + local CHANNEL=\\"$3\\" + local CHAINCODE=\\"$4\\" + local COMMAND=\\"$5\\" + local TRANSIENT=\\"$6\\" + + echo \\"Chaincode invoke:\\" + inputLog \\"CLI: $CLI\\" + inputLog \\"PEERS: $PEERS\\" + inputLog \\"CHANNEL: $CHANNEL\\" + inputLog \\"CHAINCODE: $CHAINCODE\\" + inputLog \\"COMMAND: $COMMAND\\" + inputLog \\"TRANSIENT: $TRANSIENT\\" + + PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + + # shellcheck disable=SC2086 + docker exec \\"$CLI\\" peer chaincode invoke \\\\ + $PEER_ADDRESSES \\\\ + -C \\"$CHANNEL\\" \\\\ + -n \\"$CHAINCODE\\" \\\\ + -c \\"$COMMAND\\" \\\\ + --transient \\"$TRANSIENT\\" \\\\ + --waitForEvent \\\\ + --waitForEventTimeout 90s \\\\ + 2>&1 +} + +peerChaincodeInvokeTls() { + echo \\"chaincode invoke TLS is not yet suppported\\" + exit 1 +} " `; From e8598b0af97592a967d38e819e5e8bd1215fa113 Mon Sep 17 00:00:00 2001 From: jnjerin Date: Mon, 18 Sep 2023 13:56:46 +0300 Subject: [PATCH 16/83] Initialize peer_certs only for tls and update snapshots Signed-off-by: jnjerin --- ...2orgs-1chaincode-private-data.json.test.ts.snap | 8 -------- ...g-hlf1.4-1org-1chaincode-raft.json.test.ts.snap | 6 ++++++ ...onfig-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 10 ---------- ...orgs-2chaincodes-private-data.yaml.test.ts.snap | 8 -------- ...hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap | 10 ++++++++++ ...1org-1chaincode-raft-explorer.json.test.ts.snap | 4 ++++ ...o-config-hlf2-1org-1chaincode.json.test.ts.snap | 6 ------ ...g-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 10 ++++++++++ ...orgs-1chaincode-raft-explorer.json.test.ts.snap | 14 ++++++++++++++ .../templates/fabric-docker/chaincode-scripts.sh | 4 ++-- 10 files changed, 46 insertions(+), 34 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index 0895c24b..1533eb19 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -2172,28 +2172,20 @@ chaincodeInvoke() { cli=\\"\\" peer_addresses=\\"\\" - peer_certs=\\"\\" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" - fi if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" - fi if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then cli=\\"cli.org2.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" - fi if [ -z \\"$peer_addresses\\" ]; then echo \\"Unknown peers: $1\\" diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index feb12a0c..b296c305 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -1574,15 +1574,21 @@ chaincodeInvoke() { cli=\\"\\" peer_addresses=\\"\\" + peer_certs=\\"\\" + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + fi if [ -z \\"$peer_addresses\\" ]; then echo \\"Unknown peers: $1\\" diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index f080aa7c..edaf8063 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -2204,35 +2204,25 @@ chaincodeInvoke() { cli=\\"\\" peer_addresses=\\"\\" - peer_certs=\\"\\" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" - fi if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" - fi if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then cli=\\"cli.org2.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" - fi if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then cli=\\"cli.org2.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt\\" - fi if [ -z \\"$peer_addresses\\" ]; then echo \\"Unknown peers: $1\\" diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index d5fb30cd..0c1cb7de 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -2179,28 +2179,20 @@ chaincodeInvoke() { cli=\\"\\" peer_addresses=\\"\\" - peer_certs=\\"\\" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" - fi if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" - fi if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then cli=\\"cli.org2.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" - fi if [ -z \\"$peer_addresses\\" ]; then echo \\"Unknown peers: $1\\" diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index 337ff9a4..ec9f4935 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -2375,25 +2375,35 @@ chaincodeInvoke() { cli=\\"\\" peer_addresses=\\"\\" + peer_certs=\\"\\" + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then cli=\\"cli.org2.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then cli=\\"cli.org2.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" + peer_certs=\\"$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt\\" + fi if [ -z \\"$peer_addresses\\" ]; then echo \\"Unknown peers: $1\\" diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 53359698..7bd9b1ea 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1595,10 +1595,14 @@ chaincodeInvoke() { cli=\\"\\" peer_addresses=\\"\\" + peer_certs=\\"\\" + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + fi if [ -z \\"$peer_addresses\\" ]; then echo \\"Unknown peers: $1\\" diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index c196e520..f0d024a5 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1511,21 +1511,15 @@ chaincodeInvoke() { cli=\\"\\" peer_addresses=\\"\\" - peer_certs=\\"\\" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" - fi if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" - fi if [ -z \\"$peer_addresses\\" ]; then echo \\"Unknown peers: $1\\" diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 97f631ab..f74fcf35 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -3116,25 +3116,35 @@ chaincodeInvoke() { cli=\\"\\" peer_addresses=\\"\\" + peer_certs=\\"\\" + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7061\\" + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7062\\" + peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then cli=\\"cli.org2.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7081\\" + peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then cli=\\"cli.org2.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7082\\" + peer_certs=\\"$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt\\" + fi if [ -z \\"$peer_addresses\\" ]; then echo \\"Unknown peers: $1\\" diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 503ea0d9..76a6be38 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -3423,35 +3423,49 @@ chaincodeInvoke() { cli=\\"\\" peer_addresses=\\"\\" + peer_certs=\\"\\" + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then cli=\\"cli.org1.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then cli=\\"cli.org2.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then cli=\\"cli.org2.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" + peer_certs=\\"$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer0.org3.example.com\\"* ]]; then cli=\\"cli.org3.example.com\\" peer_addresses=\\"$peer_addresses,peer0.org3.example.com:7081\\" + peer_certs=\\"$peer_certs,crypto/peers/peer0.org3.example.com/tls/ca.crt\\" + fi if [[ \\"$1\\" == *\\"peer1.org3.example.com\\"* ]]; then cli=\\"cli.org3.example.com\\" peer_addresses=\\"$peer_addresses,peer1.org3.example.com:7082\\" + peer_certs=\\"$peer_certs,crypto/peers/peer1.org3.example.com/tls/ca.crt\\" + fi if [ -z \\"$peer_addresses\\" ]; then echo \\"Unknown peers: $1\\" diff --git a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh index 1ea05772..05c4bf34 100755 --- a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh +++ b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh @@ -34,7 +34,7 @@ chaincodeInvoke() { fi cli="" peer_addresses="" - <% if (!global.tls) { %> + <% if (global.tls) { %> peer_certs="" <% } %> <% orgs.forEach((org) => { -%> @@ -42,7 +42,7 @@ chaincodeInvoke() { if [[ "$1" == *"<%= peer.address %>"* ]]; then cli="<%= org.cli.address %>" peer_addresses="$peer_addresses,<%= peer.fullAddress %>" - <% if(!global.tls) { %> + <% if(global.tls) { %> peer_certs="$peer_certs,crypto/peers/<%= peer.address %>/tls/ca.crt" <% } %> fi From 0d2f3af4ab5655b70d1a6dcb692e70f3d108524e Mon Sep 17 00:00:00 2001 From: jnjerin Date: Tue, 19 Sep 2023 12:32:18 +0300 Subject: [PATCH 17/83] implemented use of generators for tls support Signed-off-by: jnjerin --- e2e-network/docker/expect-invoke-cli-tls.sh | 50 ------------------- .../scripts/chaincode-functions-v2.sh | 36 +++++++++++-- 2 files changed, 33 insertions(+), 53 deletions(-) delete mode 100755 e2e-network/docker/expect-invoke-cli-tls.sh diff --git a/e2e-network/docker/expect-invoke-cli-tls.sh b/e2e-network/docker/expect-invoke-cli-tls.sh deleted file mode 100755 index b861838b..00000000 --- a/e2e-network/docker/expect-invoke-cli-tls.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -cli="$1" -peer="$2" -channel="$3" -chaincode="$4" -orderer_cert="$5" -command="$6" -expected="$7" -transient_default="{}" -transient="${8:-$transient_default}" - -if [ -z "$expected" ]; then - echo "Usage: ./expect-invoke-tls.sh [cli] [peer:port[,peer:port]] [channel] [chaincode] [orderer_cert] [command] [expected_substring] [transient_data]" - exit 1 -fi - -label="Invoke $channel/$cli/$peer ($orderer_cert) $command" -echo "" -echo "➜ testing: $label" - -peerAddresses="--peerAddresses $(echo "$peer" | sed 's/,/ --peerAddresses /g')" - -peerNoPort="$(echo "$peer" | sed -e 's/:[[:digit:]]\{2,\}//g')" -tlsRootCertFiles="--tlsRootCertFiles /var/hyperledger/cli/crypto/peers/$(echo "$peerNoPort" | sed 's/,/\/tls\/ca.crt --tlsRootCertFiles \/var\/hyperledger\/cli\/crypto\/peers\//g')/tls/ca.crt" - -response="$( - # shellcheck disable=SC2086 - docker exec "$cli" peer chaincode invoke \ - $peerAddresses \ - $tlsRootCertFiles \ - -C "$channel" \ - -n "$chaincode" \ - -c "$command" \ - --transient "$transient" \ - --waitForEvent \ - --waitForEventTimeout 90s \ - --tls \ - --cafile "/var/hyperledger/cli/crypto-orderer/$orderer_cert" \ - 2>&1 -)" - -echo "$response" - -if echo "$response" | grep -F "$expected"; then - echo "✅ ok (cli-tls): $label" -else - echo "❌ failed (cli-tls): $label | expected: $expected" - exit 1 -fi diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index 30db81de..b24216bf 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -355,9 +355,39 @@ peerChaincodeInvoke() { --waitForEventTimeout 90s \ 2>&1 } - +# Function to perform chaincode invoke for Tls peerChaincodeInvokeTls () { - echo "chaincode invoke TLS is not yet suppported" - exit 1 + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + +PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" + +TLSROOTCERTFILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$PEERS" | sed 's/,/\/tls\/ca.crt --tlsRootCertFiles \/var\/hyperledger\/cli\//g')/tls/ca.crt" + +# shellcheck disable=SC2086 + docker exec "$CLI" peer chaincode invoke \ + $PEER_ADDRESSES \ + $TLSROOTCERTFILES \ + -C "$CHANNEL" \ + -n "$CHAINCODE" \ + -c "$COMMAND" \ + --transient "$TRANSIENT" \ + --waitForEvent \ + --waitForEventTimeout 90s \ + --tls \ + --cafile "/var/hyperledger/cli/$CA_CERT" \ + 2>&1 } From 5309628aee38d51789af08b80898c5d6928c978f Mon Sep 17 00:00:00 2001 From: jnjerin Date: Tue, 19 Sep 2023 13:05:42 +0300 Subject: [PATCH 18/83] Update snapshots Signed-off-by: jnjerin --- ...1chaincode-raft-explorer.json.test.ts.snap | 36 +++++++++++++++++-- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 36 +++++++++++++++++-- ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 36 +++++++++++++++++-- ...1chaincode-raft-explorer.json.test.ts.snap | 36 +++++++++++++++++-- 4 files changed, 132 insertions(+), 12 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 7bd9b1ea..540c76bf 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -2811,10 +2811,40 @@ peerChaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } - +# Function to perform chaincode invoke for Tls peerChaincodeInvokeTls() { - echo \\"chaincode invoke TLS is not yet suppported\\" - exit 1 + local CLI=\\"$1\\" + local PEERS=\\"$2\\" + local CHANNEL=\\"$3\\" + local CHAINCODE=\\"$4\\" + local COMMAND=\\"$5\\" + local TRANSIENT=\\"$6\\" + + echo \\"Chaincode invoke:\\" + inputLog \\"CLI: $CLI\\" + inputLog \\"PEERS: $PEERS\\" + inputLog \\"CHANNEL: $CHANNEL\\" + inputLog \\"CHAINCODE: $CHAINCODE\\" + inputLog \\"COMMAND: $COMMAND\\" + inputLog \\"TRANSIENT: $TRANSIENT\\" + + PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + + TLSROOTCERTFILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEERS\\" | sed 's/,/\\\\/tls\\\\/ca.crt --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')/tls/ca.crt\\" + + # shellcheck disable=SC2086 + docker exec \\"$CLI\\" peer chaincode invoke \\\\ + $PEER_ADDRESSES \\\\ + $TLSROOTCERTFILES \\\\ + -C \\"$CHANNEL\\" \\\\ + -n \\"$CHAINCODE\\" \\\\ + -c \\"$COMMAND\\" \\\\ + --transient \\"$TRANSIENT\\" \\\\ + --waitForEvent \\\\ + --waitForEventTimeout 90s \\\\ + --tls \\\\ + --cafile \\"/var/hyperledger/cli/$CA_CERT\\" \\\\ + 2>&1 } " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index f0d024a5..5af9d8a3 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -2687,10 +2687,40 @@ peerChaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } - +# Function to perform chaincode invoke for Tls peerChaincodeInvokeTls() { - echo \\"chaincode invoke TLS is not yet suppported\\" - exit 1 + local CLI=\\"$1\\" + local PEERS=\\"$2\\" + local CHANNEL=\\"$3\\" + local CHAINCODE=\\"$4\\" + local COMMAND=\\"$5\\" + local TRANSIENT=\\"$6\\" + + echo \\"Chaincode invoke:\\" + inputLog \\"CLI: $CLI\\" + inputLog \\"PEERS: $PEERS\\" + inputLog \\"CHANNEL: $CHANNEL\\" + inputLog \\"CHAINCODE: $CHAINCODE\\" + inputLog \\"COMMAND: $COMMAND\\" + inputLog \\"TRANSIENT: $TRANSIENT\\" + + PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + + TLSROOTCERTFILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEERS\\" | sed 's/,/\\\\/tls\\\\/ca.crt --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')/tls/ca.crt\\" + + # shellcheck disable=SC2086 + docker exec \\"$CLI\\" peer chaincode invoke \\\\ + $PEER_ADDRESSES \\\\ + $TLSROOTCERTFILES \\\\ + -C \\"$CHANNEL\\" \\\\ + -n \\"$CHAINCODE\\" \\\\ + -c \\"$COMMAND\\" \\\\ + --transient \\"$TRANSIENT\\" \\\\ + --waitForEvent \\\\ + --waitForEventTimeout 90s \\\\ + --tls \\\\ + --cafile \\"/var/hyperledger/cli/$CA_CERT\\" \\\\ + 2>&1 } " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index f74fcf35..fe8041bd 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -5012,10 +5012,40 @@ peerChaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } - +# Function to perform chaincode invoke for Tls peerChaincodeInvokeTls() { - echo \\"chaincode invoke TLS is not yet suppported\\" - exit 1 + local CLI=\\"$1\\" + local PEERS=\\"$2\\" + local CHANNEL=\\"$3\\" + local CHAINCODE=\\"$4\\" + local COMMAND=\\"$5\\" + local TRANSIENT=\\"$6\\" + + echo \\"Chaincode invoke:\\" + inputLog \\"CLI: $CLI\\" + inputLog \\"PEERS: $PEERS\\" + inputLog \\"CHANNEL: $CHANNEL\\" + inputLog \\"CHAINCODE: $CHAINCODE\\" + inputLog \\"COMMAND: $COMMAND\\" + inputLog \\"TRANSIENT: $TRANSIENT\\" + + PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + + TLSROOTCERTFILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEERS\\" | sed 's/,/\\\\/tls\\\\/ca.crt --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')/tls/ca.crt\\" + + # shellcheck disable=SC2086 + docker exec \\"$CLI\\" peer chaincode invoke \\\\ + $PEER_ADDRESSES \\\\ + $TLSROOTCERTFILES \\\\ + -C \\"$CHANNEL\\" \\\\ + -n \\"$CHAINCODE\\" \\\\ + -c \\"$COMMAND\\" \\\\ + --transient \\"$TRANSIENT\\" \\\\ + --waitForEvent \\\\ + --waitForEventTimeout 90s \\\\ + --tls \\\\ + --cafile \\"/var/hyperledger/cli/$CA_CERT\\" \\\\ + 2>&1 } " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 76a6be38..8fec1967 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -5519,10 +5519,40 @@ peerChaincodeInvoke() { --waitForEventTimeout 90s \\\\ 2>&1 } - +# Function to perform chaincode invoke for Tls peerChaincodeInvokeTls() { - echo \\"chaincode invoke TLS is not yet suppported\\" - exit 1 + local CLI=\\"$1\\" + local PEERS=\\"$2\\" + local CHANNEL=\\"$3\\" + local CHAINCODE=\\"$4\\" + local COMMAND=\\"$5\\" + local TRANSIENT=\\"$6\\" + + echo \\"Chaincode invoke:\\" + inputLog \\"CLI: $CLI\\" + inputLog \\"PEERS: $PEERS\\" + inputLog \\"CHANNEL: $CHANNEL\\" + inputLog \\"CHAINCODE: $CHAINCODE\\" + inputLog \\"COMMAND: $COMMAND\\" + inputLog \\"TRANSIENT: $TRANSIENT\\" + + PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + + TLSROOTCERTFILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEERS\\" | sed 's/,/\\\\/tls\\\\/ca.crt --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')/tls/ca.crt\\" + + # shellcheck disable=SC2086 + docker exec \\"$CLI\\" peer chaincode invoke \\\\ + $PEER_ADDRESSES \\\\ + $TLSROOTCERTFILES \\\\ + -C \\"$CHANNEL\\" \\\\ + -n \\"$CHAINCODE\\" \\\\ + -c \\"$COMMAND\\" \\\\ + --transient \\"$TRANSIENT\\" \\\\ + --waitForEvent \\\\ + --waitForEventTimeout 90s \\\\ + --tls \\\\ + --cafile \\"/var/hyperledger/cli/$CA_CERT\\" \\\\ + 2>&1 } " `; From e1ab212fc21df1002ab2618b56d86371c98f6f7e Mon Sep 17 00:00:00 2001 From: jnjerin Date: Fri, 22 Sep 2023 11:44:49 +0300 Subject: [PATCH 19/83] test-02 updated to use expect-invoke-cli and clean up Signed-off-by: jnjerin --- e2e-network/docker/test-02-raft-2orgs.sh | 6 +++--- .../templates/fabric-docker/chaincode-scripts.sh | 1 - .../fabric-docker/scripts/chaincode-functions-v2.sh | 2 ++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/e2e-network/docker/test-02-raft-2orgs.sh b/e2e-network/docker/test-02-raft-2orgs.sh index 916bc8dc..a32eed78 100755 --- a/e2e-network/docker/test-02-raft-2orgs.sh +++ b/e2e-network/docker/test-02-raft-2orgs.sh @@ -43,7 +43,7 @@ expectInvokeRest() { } expectInvokeCli() { - sh "$TEST_TMP/../expect-invoke-cli-tls.sh" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" + (cd "$TEST_TMP" && sh ../expect-invoke-cli.sh "$1" "$2" "$3" "$4" ) } trap networkDown EXIT @@ -95,7 +95,7 @@ fablo_rest_org1="localhost:8802" expectInvokeRest "$fablo_rest_org1" "my-channel1" "chaincode1" \ "KVContract:put" '["name", "Jack Sparrow"]' \ '{"response":{"success":"OK"}}' -expectInvokeCli "cli.org2.example.com" "peer0.org2.example.com:7081" "my-channel1" "chaincode1" "tlsca.orderer1.com-cert.pem" \ +expectInvokeCli "peer0.org2.example.com" "my-channel1" "chaincode1" \ '{"Args":["KVContract:get", "name"]}' \ '{\"success\":\"Jack Sparrow\"}' @@ -103,7 +103,7 @@ expectInvokeCli "cli.org2.example.com" "peer0.org2.example.com:7081" "my-channel expectInvokeRest "$fablo_rest_org1" "my-channel2" "chaincode2" \ "PokeballContract:createPokeball" '["id1", "Pokeball 1"]' \ '{"response":""}' -expectInvokeCli "cli.org2.example.com" "peer1.org2.example.com:7082" "my-channel2" "chaincode2" "tlsca.orderer1.com-cert.pem" \ +expectInvokeCli "peer1.org2.example.com" "my-channel2" "chaincode2" \ '{"Args":["PokeballContract:readPokeball", "id1"]}' \ '{\"value\":\"Pokeball 1\"}' diff --git a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh index 05c4bf34..6cae854f 100755 --- a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh +++ b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh @@ -1,7 +1,6 @@ #!/usr/bin/env bash chaincodeList() { - echo " chaincodeList $1 $2 " if [ "$#" -ne 2 ]; then echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index b24216bf..c65596d7 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -363,6 +363,7 @@ peerChaincodeInvokeTls () { local CHAINCODE="$4" local COMMAND="$5" local TRANSIENT="$6" + local CA_CERT=$7 echo "Chaincode invoke:" inputLog "CLI: $CLI" @@ -371,6 +372,7 @@ peerChaincodeInvokeTls () { inputLog "CHAINCODE: $CHAINCODE" inputLog "COMMAND: $COMMAND" inputLog "TRANSIENT: $TRANSIENT" + inputLog "CA_CERT: $CA_CERT" PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" From 2df47b8d6c9091fd8b355364a987d668edb3d1fa Mon Sep 17 00:00:00 2001 From: jnjerin Date: Fri, 22 Sep 2023 11:51:29 +0300 Subject: [PATCH 20/83] updated snapshots Signed-off-by: jnjerin --- ...nfig-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap | 1 - .../fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap | 1 - .../fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 1 - ...fig-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap | 1 - ...ablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap | 1 - ...config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap | 3 ++- .../fablo-config-hlf2-1org-1chaincode.json.test.ts.snap | 3 ++- .../fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 3 ++- ...onfig-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap | 3 ++- 9 files changed, 8 insertions(+), 9 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index 1533eb19..44bfa016 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -2128,7 +2128,6 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c "#!/usr/bin/env bash chaincodeList() { - echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index b296c305..9010e7ae 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -1536,7 +1536,6 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro "#!/usr/bin/env bash chaincodeList() { - echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index edaf8063..eb88e152 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -2154,7 +2154,6 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper "#!/usr/bin/env bash chaincodeList() { - echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index 0c1cb7de..51c4b037 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -2135,7 +2135,6 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should "#!/usr/bin/env bash chaincodeList() { - echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index ec9f4935..85e39204 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -2325,7 +2325,6 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p "#!/usr/bin/env bash chaincodeList() { - echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 540c76bf..33c2e0c4 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1563,7 +1563,6 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre "#!/usr/bin/env bash chaincodeList() { - echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 @@ -2819,6 +2818,7 @@ peerChaincodeInvokeTls() { local CHAINCODE=\\"$4\\" local COMMAND=\\"$5\\" local TRANSIENT=\\"$6\\" + local CA_CERT=$7 echo \\"Chaincode invoke:\\" inputLog \\"CLI: $CLI\\" @@ -2827,6 +2827,7 @@ peerChaincodeInvokeTls() { inputLog \\"CHAINCODE: $CHAINCODE\\" inputLog \\"COMMAND: $COMMAND\\" inputLog \\"TRANSIENT: $TRANSIENT\\" + inputLog \\"CA_CERT: $CA_CERT\\" PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 5af9d8a3..306e67e5 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1473,7 +1473,6 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e "#!/usr/bin/env bash chaincodeList() { - echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 @@ -2695,6 +2694,7 @@ peerChaincodeInvokeTls() { local CHAINCODE=\\"$4\\" local COMMAND=\\"$5\\" local TRANSIENT=\\"$6\\" + local CA_CERT=$7 echo \\"Chaincode invoke:\\" inputLog \\"CLI: $CLI\\" @@ -2703,6 +2703,7 @@ peerChaincodeInvokeTls() { inputLog \\"CHAINCODE: $CHAINCODE\\" inputLog \\"COMMAND: $COMMAND\\" inputLog \\"TRANSIENT: $TRANSIENT\\" + inputLog \\"CA_CERT: $CA_CERT\\" PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index fe8041bd..bbef7f88 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -3066,7 +3066,6 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro "#!/usr/bin/env bash chaincodeList() { - echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 @@ -5020,6 +5019,7 @@ peerChaincodeInvokeTls() { local CHAINCODE=\\"$4\\" local COMMAND=\\"$5\\" local TRANSIENT=\\"$6\\" + local CA_CERT=$7 echo \\"Chaincode invoke:\\" inputLog \\"CLI: $CLI\\" @@ -5028,6 +5028,7 @@ peerChaincodeInvokeTls() { inputLog \\"CHAINCODE: $CHAINCODE\\" inputLog \\"COMMAND: $COMMAND\\" inputLog \\"TRANSIENT: $TRANSIENT\\" + inputLog \\"CA_CERT: $CA_CERT\\" PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 8fec1967..5db78221 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -3361,7 +3361,6 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr "#!/usr/bin/env bash chaincodeList() { - echo \\" chaincodeList $1 $2 \\" if [ \\"$#\\" -ne 2 ]; then echo \\"Expected 2 parameters for chaincode list, but got: $*\\" exit 1 @@ -5527,6 +5526,7 @@ peerChaincodeInvokeTls() { local CHAINCODE=\\"$4\\" local COMMAND=\\"$5\\" local TRANSIENT=\\"$6\\" + local CA_CERT=$7 echo \\"Chaincode invoke:\\" inputLog \\"CLI: $CLI\\" @@ -5535,6 +5535,7 @@ peerChaincodeInvokeTls() { inputLog \\"CHAINCODE: $CHAINCODE\\" inputLog \\"COMMAND: $COMMAND\\" inputLog \\"TRANSIENT: $TRANSIENT\\" + inputLog \\"CA_CERT: $CA_CERT\\" PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" From 387cea7393637b2f09e4cee6eb8111532d08dc7e Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 26 Sep 2023 13:46:30 +0200 Subject: [PATCH 21/83] Create bump version script and bump version Signed-off-by: Jakub Dzikowski --- README.md | 8 ++-- bump-version.sh | 40 +++++++++++++++++++ docs/schema.json | 2 +- e2e/__snapshots__/fabloCommands.test.ts.snap | 6 +-- e2e/__snapshots__/schema.test.ts.snap | 2 +- fablo.sh | 2 +- package-lock.json | 4 +- package.json | 2 +- ...-hlf1.3-2orgs-1chaincode-private-data.json | 2 +- ...lo-config-hlf1.4-1org-1chaincode-raft.json | 2 +- .../fablo-config-hlf1.4-2orgs-1chaincode.json | 2 +- ...hlf1.4-2orgs-2chaincodes-private-data.yaml | 2 +- ...-config-hlf1.4-2orgs-2chaincodes-raft.json | 2 +- ...fablo-config-hlf2-1org-1chaincode-k8s.json | 2 +- ...ig-hlf2-1org-1chaincode-raft-explorer.json | 2 +- .../fablo-config-hlf2-1org-1chaincode.json | 2 +- ...lo-config-hlf2-2orgs-2chaincodes-raft.yaml | 2 +- ...g-hlf2-3orgs-1chaincode-raft-explorer.json | 2 +- 18 files changed, 63 insertions(+), 23 deletions(-) create mode 100755 bump-version.sh diff --git a/README.md b/README.md index 2abdb334..01633b8f 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ You may keep the script in the root directory of your project or install it glob To install it globally: ```bash -sudo curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.1.0/fablo.sh -o /usr/local/bin/fablo && sudo chmod +x /usr/local/bin/fablo +sudo curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/fablo.sh -o /usr/local/bin/fablo && sudo chmod +x /usr/local/bin/fablo ``` To get a copy of Fablo for a single project, execute in the project root: ```bash -curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.1.0/fablo.sh -o ./fablo && chmod +x ./fablo +curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/fablo.sh -o ./fablo && chmod +x ./fablo ``` ## Getting started @@ -325,7 +325,7 @@ The basic structure of Fablo config file is as follows: ```json { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.1.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { ... }, "orgs": [ ... ], "channels": [ ... ], @@ -488,7 +488,7 @@ Genrated Hooks are saved in `fablo-target/hooks`. ```yaml --- -"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.1.0/schema.json +"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json global: fabricVersion: 2.4.2 tls: false diff --git a/bump-version.sh b/bump-version.sh new file mode 100755 index 00000000..c2c83c49 --- /dev/null +++ b/bump-version.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +set -eu + +old_version=$(< package.json jq -r '.version') +ver_arg="${1:-unstable}" + +if [ "$ver_arg" = "patch" ] || [ "$ver_arg" = "minor" ] || [ "$ver_arg" = "major" ]; then + new_version=$(semver "$old_version" -i "$ver_arg") +elif [ "$ver_arg" = "unstable" ]; then + new_version=$(semver "$old_version" -i prerelease --preid unstable) +else + echo "Invalid version parameter: $ver_arg" + echo "Usage: $0 [patch|minor|major|unstable]" + exit 1 +fi + +echo "Updating version from $old_version to $new_version" +echo -n " - package.json... " +npm version "$new_version" --no-git-tag-version > /dev/null +echo "done" + +echo -n " - FABLO_VERSION... " +perl -i -pe "s/FABLO_VERSION=\"[^\"]*\"/FABLO_VERSION=\"${new_version}\"/g" fablo.sh +perl -i -pe "s/FABLO_VERSION=\"[^\"]*\"/FABLO_VERSION=\"${new_version}\"/g" e2e/__snapshots__/* +echo "done" + +echo -n " - JSON schema URL... " +schema_update_pattern="s/download\/[0-9-.a-zA-Z]*\/schema.json/download\/${new_version}\/schema.json/g" +perl -i -pe "$schema_update_pattern" README.md +perl -i -pe "$schema_update_pattern" docs/schema.json +perl -i -pe "$schema_update_pattern" samples/*.json +perl -i -pe "$schema_update_pattern" samples/*.yaml +perl -i -pe "$schema_update_pattern" e2e/__snapshots__/* +echo "done" + +echo -n " - download URL... " +download_update_pattern="s/download\/[0-9-.a-zA-Z]*\/fablo.sh/download\/${new_version}\/fablo.sh/g" +perl -i -pe "$download_update_pattern" README.md +echo "done" \ No newline at end of file diff --git a/docs/schema.json b/docs/schema.json index 08d5a22c..a493429c 100644 --- a/docs/schema.json +++ b/docs/schema.json @@ -12,7 +12,7 @@ ], "properties": { "$schema": { - "const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json" + "const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json" }, "global": { "$id": "#/properties/global", diff --git a/e2e/__snapshots__/fabloCommands.test.ts.snap b/e2e/__snapshots__/fabloCommands.test.ts.snap index 4cc334c5..cdb19045 100644 --- a/e2e/__snapshots__/fabloCommands.test.ts.snap +++ b/e2e/__snapshots__/fabloCommands.test.ts.snap @@ -2907,7 +2907,7 @@ Validation warnings count: 0 exports[`init should init simple fablo config 1`] = ` "{ - \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json\\", + \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json\\", \\"global\\": { \\"fabricVersion\\": \\"2.4.7\\", \\"tls\\": false, @@ -2961,7 +2961,7 @@ exports[`init should init simple fablo config 1`] = ` exports[`init should init simple fablo config with node chaincode 1`] = ` "{ - \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json\\", + \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json\\", \\"global\\": { \\"fabricVersion\\": \\"2.4.7\\", \\"tls\\": false, @@ -3023,7 +3023,7 @@ exports[`init should init simple fablo config with node chaincode 1`] = ` exports[`init should init simple fablo config with node chaincode and rest api 1`] = ` "{ - \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json\\", + \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json\\", \\"global\\": { \\"fabricVersion\\": \\"2.4.7\\", \\"tls\\": false, diff --git a/e2e/__snapshots__/schema.test.ts.snap b/e2e/__snapshots__/schema.test.ts.snap index 03b48ff3..8b96b88d 100644 --- a/e2e/__snapshots__/schema.test.ts.snap +++ b/e2e/__snapshots__/schema.test.ts.snap @@ -7,7 +7,7 @@ Object { "default": Object {}, "properties": Object { "$schema": Object { - "const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", }, "chaincodes": Object { "$id": "#/properties/chaincodes", diff --git a/fablo.sh b/fablo.sh index 6b361b89..35694e90 100755 --- a/fablo.sh +++ b/fablo.sh @@ -2,7 +2,7 @@ set -e -FABLO_VERSION="1.2.0" +FABLO_VERSION="1.2.1-unstable.0" FABLO_IMAGE_NAME="softwaremill/fablo" FABLO_IMAGE="$FABLO_IMAGE_NAME:$FABLO_VERSION" diff --git a/package-lock.json b/package-lock.json index e912599b..09320692 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "generator-fablo", - "version": "1.2.0", + "version": "1.2.1-unstable.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "generator-fablo", - "version": "1.2.0", + "version": "1.2.1-unstable.0", "license": "Apache-2.0", "dependencies": { "chalk": "^4.1.0", diff --git a/package.json b/package.json index fe972fab..d828b98c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-fablo", - "version": "1.2.0", + "version": "1.2.1-unstable.0", "description": "Fablo is a simple tool to generate the Hyperledger Fabric blockchain network and run it on Docker. It supports RAFT and solo consensus protocols, multiple organizations and channels, chaincode installation and upgrade.", "author": "Piotr Hejwowski , Jakub Dzikowski ", "repository": { diff --git a/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json b/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json index 547eea26..6e106b6d 100644 --- a/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json +++ b/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "1.3.0", "tls": false diff --git a/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json b/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json index 3b357cd6..bd47697a 100644 --- a/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json +++ b/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "1.4.6", "tls": true, diff --git a/samples/fablo-config-hlf1.4-2orgs-1chaincode.json b/samples/fablo-config-hlf1.4-2orgs-1chaincode.json index 98cd99f2..cfc4d1d2 100644 --- a/samples/fablo-config-hlf1.4-2orgs-1chaincode.json +++ b/samples/fablo-config-hlf1.4-2orgs-1chaincode.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "1.4.6", "tls": false diff --git a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml b/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml index 7c3ecd9c..844191ba 100644 --- a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml +++ b/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml @@ -1,5 +1,5 @@ --- -"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json +"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json global: fabricVersion: 1.4.11 tls: false diff --git a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json b/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json index ed8ab19e..e20d735a 100644 --- a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json +++ b/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "1.4.6", "tls": true diff --git a/samples/fablo-config-hlf2-1org-1chaincode-k8s.json b/samples/fablo-config-hlf2-1org-1chaincode-k8s.json index a93be7b3..04798481 100644 --- a/samples/fablo-config-hlf2-1org-1chaincode-k8s.json +++ b/samples/fablo-config-hlf2-1org-1chaincode-k8s.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "2.4.7", "tls": false, diff --git a/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json b/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json index 7c3611c1..8c0886b4 100644 --- a/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json +++ b/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "2.3.3", "tls": true, diff --git a/samples/fablo-config-hlf2-1org-1chaincode.json b/samples/fablo-config-hlf2-1org-1chaincode.json index ae60e60f..2aecb739 100644 --- a/samples/fablo-config-hlf2-1org-1chaincode.json +++ b/samples/fablo-config-hlf2-1org-1chaincode.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "2.4.7", "tls": false diff --git a/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml b/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml index 24797cef..c150b9d6 100644 --- a/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml +++ b/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml @@ -1,5 +1,5 @@ --- -"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json +"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json global: fabricVersion: 2.4.3 tls: true diff --git a/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json b/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json index df3a6069..42b60d1c 100644 --- a/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json +++ b/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "2.3.2", "tls": true, From 2f6e3dc75a8153b24f5404add7b1bf7e6605fd52 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 26 Sep 2023 15:07:56 +0200 Subject: [PATCH 22/83] Update FABLO_VERSION replace pattern Signed-off-by: Jakub Dzikowski --- bump-version.sh | 4 ++-- ...fig-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap | 2 +- ...fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap | 2 +- .../fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 2 +- ...ig-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap | 2 +- ...blo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap | 2 +- .../fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap | 2 +- ...onfig-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap | 2 +- .../fablo-config-hlf2-1org-1chaincode.json.test.ts.snap | 2 +- ...fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 2 +- ...nfig-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap | 2 +- fablo.sh | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bump-version.sh b/bump-version.sh index c2c83c49..2aaadd53 100755 --- a/bump-version.sh +++ b/bump-version.sh @@ -21,8 +21,8 @@ npm version "$new_version" --no-git-tag-version > /dev/null echo "done" echo -n " - FABLO_VERSION... " -perl -i -pe "s/FABLO_VERSION=\"[^\"]*\"/FABLO_VERSION=\"${new_version}\"/g" fablo.sh -perl -i -pe "s/FABLO_VERSION=\"[^\"]*\"/FABLO_VERSION=\"${new_version}\"/g" e2e/__snapshots__/* +perl -i -pe "s/FABLO_VERSION=.*\\n/FABLO_VERSION=${new_version}\\n/g" fablo.sh +perl -i -pe "s/FABLO_VERSION=.*\\n/FABLO_VERSION=${new_version}\\n/g" e2e/__snapshots__/* echo "done" echo -n " - JSON schema URL... " diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index ab24ec7b..baa6a6c4 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -2084,7 +2084,7 @@ fi `; exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index 7d923fc8..6100ee88 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -1495,7 +1495,7 @@ fi `; exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index 3929867b..0eba8204 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -2110,7 +2110,7 @@ fi `; exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index 8d3d0ccc..7f905718 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -2091,7 +2091,7 @@ fi `; exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index 85c28e18..4ba3f4fc 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -2281,7 +2281,7 @@ fi `; exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap index c910c780..93cdf9af 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap @@ -86,7 +86,7 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper REPOSITORY=\\"https://kfsoftware.github.io/hlf-helm-charts\\" STORAGE_CLASS=$(kubectl describe sc | grep Name | tr -s ' ' | cut -d ':' -f 2 | cut -d ' ' -f 2) -FABLO_VERSION=1.2.0 +FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_CONFIG= ORDERER_IMAGE=hyperledger/fabric-orderer diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 280ce448..71feaad1 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1522,7 +1522,7 @@ fi `; exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index d22b3636..5ba15501 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1432,7 +1432,7 @@ fi `; exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 4272877b..8bef4e40 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -3019,7 +3019,7 @@ fi `; exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 54f3580a..cbfbab09 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -3314,7 +3314,7 @@ fi `; exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/fablo.sh b/fablo.sh index 35694e90..ee5107ad 100755 --- a/fablo.sh +++ b/fablo.sh @@ -2,7 +2,7 @@ set -e -FABLO_VERSION="1.2.1-unstable.0" +FABLO_VERSION=1.2.1-unstable.0 FABLO_IMAGE_NAME="softwaremill/fablo" FABLO_IMAGE="$FABLO_IMAGE_NAME:$FABLO_VERSION" From ea72f40c7b627e0161caeef2249f40e428ae9c4c Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 26 Sep 2023 15:25:44 +0200 Subject: [PATCH 23/83] Include missing file for schema url change Signed-off-by: Jakub Dzikowski --- bump-version.sh | 1 + docs/sample.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bump-version.sh b/bump-version.sh index 2aaadd53..9bacd2e2 100755 --- a/bump-version.sh +++ b/bump-version.sh @@ -28,6 +28,7 @@ echo "done" echo -n " - JSON schema URL... " schema_update_pattern="s/download\/[0-9-.a-zA-Z]*\/schema.json/download\/${new_version}\/schema.json/g" perl -i -pe "$schema_update_pattern" README.md +perl -i -pe "$schema_update_pattern" docs/sample.json perl -i -pe "$schema_update_pattern" docs/schema.json perl -i -pe "$schema_update_pattern" samples/*.json perl -i -pe "$schema_update_pattern" samples/*.yaml diff --git a/docs/sample.json b/docs/sample.json index 9fa2bd0a..4f31cb0f 100644 --- a/docs/sample.json +++ b/docs/sample.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "2.3.2", "tls": false, From 82825b3ec137860e51dd608edeacf27f9a4096a4 Mon Sep 17 00:00:00 2001 From: jnjerin Date: Tue, 3 Oct 2023 09:07:59 +0300 Subject: [PATCH 24/83] modified path for tls files Signed-off-by: jnjerin --- e2e-network/docker/expect-invoke-cli.sh | 2 +- e2e-network/docker/test-02-raft-2orgs.sh | 2 +- .../fabric-docker/scripts/chaincode-functions-v2.sh | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/e2e-network/docker/expect-invoke-cli.sh b/e2e-network/docker/expect-invoke-cli.sh index f2ffcfba..7496c3d3 100755 --- a/e2e-network/docker/expect-invoke-cli.sh +++ b/e2e-network/docker/expect-invoke-cli.sh @@ -9,7 +9,7 @@ transient_default="{}" transient="${6:-$transient_default}" if [ -z "$expected" ]; then - echo "Usage: ./expect-invoke.sh [peer[,peer]] [channel] [chaincode] [command] [expected_substring] [transient_data]" + echo "Usage: ./expect-invoke.sh [peers[,peers]] [channel] [chaincode] [command] [expected_substring] [transient_data]" exit 1 fi diff --git a/e2e-network/docker/test-02-raft-2orgs.sh b/e2e-network/docker/test-02-raft-2orgs.sh index a32eed78..0fc583cd 100755 --- a/e2e-network/docker/test-02-raft-2orgs.sh +++ b/e2e-network/docker/test-02-raft-2orgs.sh @@ -43,7 +43,7 @@ expectInvokeRest() { } expectInvokeCli() { - (cd "$TEST_TMP" && sh ../expect-invoke-cli.sh "$1" "$2" "$3" "$4" ) + (cd "$TEST_TMP" && sh ../expect-invoke-cli.sh "$1" "$2" "$3" "$4" "$5") } trap networkDown EXIT diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index c65596d7..ffec1530 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -376,12 +376,16 @@ peerChaincodeInvokeTls () { PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" -TLSROOTCERTFILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$PEERS" | sed 's/,/\/tls\/ca.crt --tlsRootCertFiles \/var\/hyperledger\/cli\//g')/tls/ca.crt" + +TLS_ROOT_CERT_FILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$CA_CERT" | sed 's/,/ --tlsRootCertFiles \/var\/hyperledger\/cli\//g')" + +inputLog "TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES" +inputLog "PEER_ADDRESSES: $PEER_ADDRESSES" # shellcheck disable=SC2086 docker exec "$CLI" peer chaincode invoke \ $PEER_ADDRESSES \ - $TLSROOTCERTFILES \ + $TLS_ROOT_CERT_FILES \ -C "$CHANNEL" \ -n "$CHAINCODE" \ -c "$COMMAND" \ From a14392714079bbde005add507204a3de483b735d Mon Sep 17 00:00:00 2001 From: jnjerin Date: Thu, 12 Oct 2023 21:31:47 +0300 Subject: [PATCH 25/83] added logic for getting tls certs Signed-off-by: jnjerin --- e2e-network/docker/test-02-raft-2orgs.sh | 2 +- .../templates/fabric-docker/chaincode-scripts.sh | 12 ++++++++---- .../fabric-docker/scripts/chaincode-functions-v2.sh | 11 ++++------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/e2e-network/docker/test-02-raft-2orgs.sh b/e2e-network/docker/test-02-raft-2orgs.sh index 0fc583cd..793120c3 100755 --- a/e2e-network/docker/test-02-raft-2orgs.sh +++ b/e2e-network/docker/test-02-raft-2orgs.sh @@ -43,7 +43,7 @@ expectInvokeRest() { } expectInvokeCli() { - (cd "$TEST_TMP" && sh ../expect-invoke-cli.sh "$1" "$2" "$3" "$4" "$5") + (cd "$TEST_TMP" && sh ../expect-invoke-cli.sh "$1" "$2" "$3" "$4" "$5" "$6") } trap networkDown EXIT diff --git a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh index 6cae854f..ea142888 100755 --- a/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh +++ b/src/setup-docker/templates/fabric-docker/chaincode-scripts.sh @@ -34,7 +34,7 @@ chaincodeInvoke() { cli="" peer_addresses="" <% if (global.tls) { %> - peer_certs="" + peer_certs="" <% } %> <% orgs.forEach((org) => { -%> <% org.peers.forEach((peer) => { -%> @@ -42,7 +42,7 @@ chaincodeInvoke() { cli="<%= org.cli.address %>" peer_addresses="$peer_addresses,<%= peer.fullAddress %>" <% if(global.tls) { %> - peer_certs="$peer_certs,crypto/peers/<%= peer.address %>/tls/ca.crt" + peer_certs="$peer_certs,crypto/peers/<%= peer.address %>/tls/ca.crt" <% } %> fi <% }) -%> @@ -54,7 +54,11 @@ chaincodeInvoke() { <% if(!global.tls) { %> peerChaincodeInvoke "$cli" "${peer_addresses:1}" "$2" "$3" "$4" "$5" <% } else { %> - peerChaincodeInvokeTls "$cli" "${peer_addresses:1}" "$2" "$3" "$4" "$5" "${peer_certs:1}" + <% channels.forEach((channel) => { %> + if [ "$2" = "<%= channel.name %>" ]; then + ca_cert="crypto-orderer/tlsca.<%= ordererGroups[0].ordererHeads[0].domain %>-cert.pem" + fi + <% }) %> + peerChaincodeInvokeTls "$cli" "${peer_addresses:1}" "$2" "$3" "$4" "$5" "${peer_certs:1}" "$ca_cert" <% } %> } - diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index ffec1530..74f86afa 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -363,7 +363,8 @@ peerChaincodeInvokeTls () { local CHAINCODE="$4" local COMMAND="$5" local TRANSIENT="$6" - local CA_CERT=$7 + local PEER_CERTS="$7" + local CA_CERT="$8" echo "Chaincode invoke:" inputLog "CLI: $CLI" @@ -372,15 +373,12 @@ peerChaincodeInvokeTls () { inputLog "CHAINCODE: $CHAINCODE" inputLog "COMMAND: $COMMAND" inputLog "TRANSIENT: $TRANSIENT" + inputLog "PEER_CERTS: $PEER_CERTS" inputLog "CA_CERT: $CA_CERT" PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" - -TLS_ROOT_CERT_FILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$CA_CERT" | sed 's/,/ --tlsRootCertFiles \/var\/hyperledger\/cli\//g')" - -inputLog "TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES" -inputLog "PEER_ADDRESSES: $PEER_ADDRESSES" +TLS_ROOT_CERT_FILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$PEER_CERTS" | sed 's/,/ --tlsRootCertFiles \/var\/hyperledger\/cli\//g')" # shellcheck disable=SC2086 docker exec "$CLI" peer chaincode invoke \ @@ -396,4 +394,3 @@ inputLog "PEER_ADDRESSES: $PEER_ADDRESSES" --cafile "/var/hyperledger/cli/$CA_CERT" \ 2>&1 } - From 9bac5d52a2b8e721ad4548a58ab8f51f0cff40ca Mon Sep 17 00:00:00 2001 From: jnjerin Date: Thu, 12 Oct 2023 21:38:49 +0300 Subject: [PATCH 26/83] updated snapshots Signed-off-by: jnjerin --- ...1.4-1org-1chaincode-raft.json.test.ts.snap | 6 ++++- ...4-2orgs-2chaincodes-raft.json.test.ts.snap | 10 ++++++++- ...1chaincode-raft-explorer.json.test.ts.snap | 14 ++++++++---- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 8 ++++--- ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 22 +++++++++++++++---- ...1chaincode-raft-explorer.json.test.ts.snap | 22 +++++++++++++++---- 6 files changed, 65 insertions(+), 17 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index 9010e7ae..13a75998 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -1594,7 +1594,11 @@ chaincodeInvoke() { exit 1 fi - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" + if [ \\"$2\\" = \\"my-channel1\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" } " diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index 85e39204..f9e833ec 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -2409,7 +2409,15 @@ chaincodeInvoke() { exit 1 fi - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" + if [ \\"$2\\" = \\"my-channel1\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + fi + + if [ \\"$2\\" = \\"my-channel2\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" } " diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 33c2e0c4..409d3141 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1608,7 +1608,11 @@ chaincodeInvoke() { exit 1 fi - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" + if [ \\"$2\\" = \\"my-channel1\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" } " @@ -2818,7 +2822,8 @@ peerChaincodeInvokeTls() { local CHAINCODE=\\"$4\\" local COMMAND=\\"$5\\" local TRANSIENT=\\"$6\\" - local CA_CERT=$7 + local PEER_CERTS=\\"$7\\" + local CA_CERT=\\"$8\\" echo \\"Chaincode invoke:\\" inputLog \\"CLI: $CLI\\" @@ -2827,16 +2832,17 @@ peerChaincodeInvokeTls() { inputLog \\"CHAINCODE: $CHAINCODE\\" inputLog \\"COMMAND: $COMMAND\\" inputLog \\"TRANSIENT: $TRANSIENT\\" + inputLog \\"PEER_CERTS: $PEER_CERTS\\" inputLog \\"CA_CERT: $CA_CERT\\" PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - TLSROOTCERTFILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEERS\\" | sed 's/,/\\\\/tls\\\\/ca.crt --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')/tls/ca.crt\\" + TLS_ROOT_CERT_FILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEER_CERTS\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')\\" # shellcheck disable=SC2086 docker exec \\"$CLI\\" peer chaincode invoke \\\\ $PEER_ADDRESSES \\\\ - $TLSROOTCERTFILES \\\\ + $TLS_ROOT_CERT_FILES \\\\ -C \\"$CHANNEL\\" \\\\ -n \\"$CHAINCODE\\" \\\\ -c \\"$COMMAND\\" \\\\ diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 306e67e5..ca25269e 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -2694,7 +2694,8 @@ peerChaincodeInvokeTls() { local CHAINCODE=\\"$4\\" local COMMAND=\\"$5\\" local TRANSIENT=\\"$6\\" - local CA_CERT=$7 + local PEER_CERTS=\\"$7\\" + local CA_CERT=\\"$8\\" echo \\"Chaincode invoke:\\" inputLog \\"CLI: $CLI\\" @@ -2703,16 +2704,17 @@ peerChaincodeInvokeTls() { inputLog \\"CHAINCODE: $CHAINCODE\\" inputLog \\"COMMAND: $COMMAND\\" inputLog \\"TRANSIENT: $TRANSIENT\\" + inputLog \\"PEER_CERTS: $PEER_CERTS\\" inputLog \\"CA_CERT: $CA_CERT\\" PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - TLSROOTCERTFILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEERS\\" | sed 's/,/\\\\/tls\\\\/ca.crt --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')/tls/ca.crt\\" + TLS_ROOT_CERT_FILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEER_CERTS\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')\\" # shellcheck disable=SC2086 docker exec \\"$CLI\\" peer chaincode invoke \\\\ $PEER_ADDRESSES \\\\ - $TLSROOTCERTFILES \\\\ + $TLS_ROOT_CERT_FILES \\\\ -C \\"$CHANNEL\\" \\\\ -n \\"$CHAINCODE\\" \\\\ -c \\"$COMMAND\\" \\\\ diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index bbef7f88..877a2076 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -3150,7 +3150,19 @@ chaincodeInvoke() { exit 1 fi - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" + if [ \\"$2\\" = \\"my-channel1\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + fi + + if [ \\"$2\\" = \\"my-channel2\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + fi + + if [ \\"$2\\" = \\"my-channel3\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" } " @@ -5019,7 +5031,8 @@ peerChaincodeInvokeTls() { local CHAINCODE=\\"$4\\" local COMMAND=\\"$5\\" local TRANSIENT=\\"$6\\" - local CA_CERT=$7 + local PEER_CERTS=\\"$7\\" + local CA_CERT=\\"$8\\" echo \\"Chaincode invoke:\\" inputLog \\"CLI: $CLI\\" @@ -5028,16 +5041,17 @@ peerChaincodeInvokeTls() { inputLog \\"CHAINCODE: $CHAINCODE\\" inputLog \\"COMMAND: $COMMAND\\" inputLog \\"TRANSIENT: $TRANSIENT\\" + inputLog \\"PEER_CERTS: $PEER_CERTS\\" inputLog \\"CA_CERT: $CA_CERT\\" PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - TLSROOTCERTFILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEERS\\" | sed 's/,/\\\\/tls\\\\/ca.crt --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')/tls/ca.crt\\" + TLS_ROOT_CERT_FILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEER_CERTS\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')\\" # shellcheck disable=SC2086 docker exec \\"$CLI\\" peer chaincode invoke \\\\ $PEER_ADDRESSES \\\\ - $TLSROOTCERTFILES \\\\ + $TLS_ROOT_CERT_FILES \\\\ -C \\"$CHANNEL\\" \\\\ -n \\"$CHAINCODE\\" \\\\ -c \\"$COMMAND\\" \\\\ diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 5db78221..cc01cf6d 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -3471,7 +3471,19 @@ chaincodeInvoke() { exit 1 fi - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" + if [ \\"$2\\" = \\"my-channel1\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + fi + + if [ \\"$2\\" = \\"my-channel2\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + fi + + if [ \\"$2\\" = \\"my-channel3\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" } " @@ -5526,7 +5538,8 @@ peerChaincodeInvokeTls() { local CHAINCODE=\\"$4\\" local COMMAND=\\"$5\\" local TRANSIENT=\\"$6\\" - local CA_CERT=$7 + local PEER_CERTS=\\"$7\\" + local CA_CERT=\\"$8\\" echo \\"Chaincode invoke:\\" inputLog \\"CLI: $CLI\\" @@ -5535,16 +5548,17 @@ peerChaincodeInvokeTls() { inputLog \\"CHAINCODE: $CHAINCODE\\" inputLog \\"COMMAND: $COMMAND\\" inputLog \\"TRANSIENT: $TRANSIENT\\" + inputLog \\"PEER_CERTS: $PEER_CERTS\\" inputLog \\"CA_CERT: $CA_CERT\\" PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - TLSROOTCERTFILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEERS\\" | sed 's/,/\\\\/tls\\\\/ca.crt --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')/tls/ca.crt\\" + TLS_ROOT_CERT_FILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEER_CERTS\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')\\" # shellcheck disable=SC2086 docker exec \\"$CLI\\" peer chaincode invoke \\\\ $PEER_ADDRESSES \\\\ - $TLSROOTCERTFILES \\\\ + $TLS_ROOT_CERT_FILES \\\\ -C \\"$CHANNEL\\" \\\\ -n \\"$CHAINCODE\\" \\\\ -c \\"$COMMAND\\" \\\\ From ca9cf95fb21c5d86ef3eeb3e6b82d217424d54ce Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Fri, 13 Oct 2023 14:21:52 +0200 Subject: [PATCH 27/83] Skip automatic version updates in README Signed-off-by: Jakub Dzikowski --- README.md | 8 ++++---- bump-version.sh | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 01633b8f..c04c984b 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ You may keep the script in the root directory of your project or install it glob To install it globally: ```bash -sudo curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/fablo.sh -o /usr/local/bin/fablo && sudo chmod +x /usr/local/bin/fablo +sudo curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/fablo.sh -o /usr/local/bin/fablo && sudo chmod +x /usr/local/bin/fablo ``` To get a copy of Fablo for a single project, execute in the project root: ```bash -curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/fablo.sh -o ./fablo && chmod +x ./fablo +curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/fablo.sh -o ./fablo && chmod +x ./fablo ``` ## Getting started @@ -325,7 +325,7 @@ The basic structure of Fablo config file is as follows: ```json { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", "global": { ... }, "orgs": [ ... ], "channels": [ ... ], @@ -488,7 +488,7 @@ Genrated Hooks are saved in `fablo-target/hooks`. ```yaml --- -"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json +"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json global: fabricVersion: 2.4.2 tls: false diff --git a/bump-version.sh b/bump-version.sh index 9bacd2e2..288b0f36 100755 --- a/bump-version.sh +++ b/bump-version.sh @@ -27,7 +27,7 @@ echo "done" echo -n " - JSON schema URL... " schema_update_pattern="s/download\/[0-9-.a-zA-Z]*\/schema.json/download\/${new_version}\/schema.json/g" -perl -i -pe "$schema_update_pattern" README.md +#perl -i -pe "$schema_update_pattern" README.md perl -i -pe "$schema_update_pattern" docs/sample.json perl -i -pe "$schema_update_pattern" docs/schema.json perl -i -pe "$schema_update_pattern" samples/*.json @@ -37,5 +37,5 @@ echo "done" echo -n " - download URL... " download_update_pattern="s/download\/[0-9-.a-zA-Z]*\/fablo.sh/download\/${new_version}\/fablo.sh/g" -perl -i -pe "$download_update_pattern" README.md +#perl -i -pe "$download_update_pattern" README.md echo "done" \ No newline at end of file From 357d4e7944afc0038db869b0cff514479c6da93d Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 26 Sep 2023 13:46:30 +0200 Subject: [PATCH 28/83] Create bump version script and bump version Signed-off-by: Jakub Dzikowski --- README.md | 8 ++-- bump-version.sh | 40 +++++++++++++++++++ docs/schema.json | 2 +- e2e/__snapshots__/fabloCommands.test.ts.snap | 6 +-- e2e/__snapshots__/schema.test.ts.snap | 2 +- fablo.sh | 2 +- package-lock.json | 4 +- package.json | 2 +- ...-hlf1.3-2orgs-1chaincode-private-data.json | 2 +- ...lo-config-hlf1.4-1org-1chaincode-raft.json | 2 +- .../fablo-config-hlf1.4-2orgs-1chaincode.json | 2 +- ...hlf1.4-2orgs-2chaincodes-private-data.yaml | 2 +- ...-config-hlf1.4-2orgs-2chaincodes-raft.json | 2 +- ...fablo-config-hlf2-1org-1chaincode-k8s.json | 2 +- ...ig-hlf2-1org-1chaincode-raft-explorer.json | 2 +- .../fablo-config-hlf2-1org-1chaincode.json | 2 +- ...lo-config-hlf2-2orgs-2chaincodes-raft.yaml | 2 +- ...g-hlf2-3orgs-1chaincode-raft-explorer.json | 2 +- 18 files changed, 63 insertions(+), 23 deletions(-) create mode 100755 bump-version.sh diff --git a/README.md b/README.md index 2abdb334..01633b8f 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ You may keep the script in the root directory of your project or install it glob To install it globally: ```bash -sudo curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.1.0/fablo.sh -o /usr/local/bin/fablo && sudo chmod +x /usr/local/bin/fablo +sudo curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/fablo.sh -o /usr/local/bin/fablo && sudo chmod +x /usr/local/bin/fablo ``` To get a copy of Fablo for a single project, execute in the project root: ```bash -curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.1.0/fablo.sh -o ./fablo && chmod +x ./fablo +curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/fablo.sh -o ./fablo && chmod +x ./fablo ``` ## Getting started @@ -325,7 +325,7 @@ The basic structure of Fablo config file is as follows: ```json { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.1.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { ... }, "orgs": [ ... ], "channels": [ ... ], @@ -488,7 +488,7 @@ Genrated Hooks are saved in `fablo-target/hooks`. ```yaml --- -"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.1.0/schema.json +"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json global: fabricVersion: 2.4.2 tls: false diff --git a/bump-version.sh b/bump-version.sh new file mode 100755 index 00000000..c2c83c49 --- /dev/null +++ b/bump-version.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +set -eu + +old_version=$(< package.json jq -r '.version') +ver_arg="${1:-unstable}" + +if [ "$ver_arg" = "patch" ] || [ "$ver_arg" = "minor" ] || [ "$ver_arg" = "major" ]; then + new_version=$(semver "$old_version" -i "$ver_arg") +elif [ "$ver_arg" = "unstable" ]; then + new_version=$(semver "$old_version" -i prerelease --preid unstable) +else + echo "Invalid version parameter: $ver_arg" + echo "Usage: $0 [patch|minor|major|unstable]" + exit 1 +fi + +echo "Updating version from $old_version to $new_version" +echo -n " - package.json... " +npm version "$new_version" --no-git-tag-version > /dev/null +echo "done" + +echo -n " - FABLO_VERSION... " +perl -i -pe "s/FABLO_VERSION=\"[^\"]*\"/FABLO_VERSION=\"${new_version}\"/g" fablo.sh +perl -i -pe "s/FABLO_VERSION=\"[^\"]*\"/FABLO_VERSION=\"${new_version}\"/g" e2e/__snapshots__/* +echo "done" + +echo -n " - JSON schema URL... " +schema_update_pattern="s/download\/[0-9-.a-zA-Z]*\/schema.json/download\/${new_version}\/schema.json/g" +perl -i -pe "$schema_update_pattern" README.md +perl -i -pe "$schema_update_pattern" docs/schema.json +perl -i -pe "$schema_update_pattern" samples/*.json +perl -i -pe "$schema_update_pattern" samples/*.yaml +perl -i -pe "$schema_update_pattern" e2e/__snapshots__/* +echo "done" + +echo -n " - download URL... " +download_update_pattern="s/download\/[0-9-.a-zA-Z]*\/fablo.sh/download\/${new_version}\/fablo.sh/g" +perl -i -pe "$download_update_pattern" README.md +echo "done" \ No newline at end of file diff --git a/docs/schema.json b/docs/schema.json index 08d5a22c..a493429c 100644 --- a/docs/schema.json +++ b/docs/schema.json @@ -12,7 +12,7 @@ ], "properties": { "$schema": { - "const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json" + "const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json" }, "global": { "$id": "#/properties/global", diff --git a/e2e/__snapshots__/fabloCommands.test.ts.snap b/e2e/__snapshots__/fabloCommands.test.ts.snap index 4cc334c5..cdb19045 100644 --- a/e2e/__snapshots__/fabloCommands.test.ts.snap +++ b/e2e/__snapshots__/fabloCommands.test.ts.snap @@ -2907,7 +2907,7 @@ Validation warnings count: 0 exports[`init should init simple fablo config 1`] = ` "{ - \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json\\", + \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json\\", \\"global\\": { \\"fabricVersion\\": \\"2.4.7\\", \\"tls\\": false, @@ -2961,7 +2961,7 @@ exports[`init should init simple fablo config 1`] = ` exports[`init should init simple fablo config with node chaincode 1`] = ` "{ - \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json\\", + \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json\\", \\"global\\": { \\"fabricVersion\\": \\"2.4.7\\", \\"tls\\": false, @@ -3023,7 +3023,7 @@ exports[`init should init simple fablo config with node chaincode 1`] = ` exports[`init should init simple fablo config with node chaincode and rest api 1`] = ` "{ - \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json\\", + \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json\\", \\"global\\": { \\"fabricVersion\\": \\"2.4.7\\", \\"tls\\": false, diff --git a/e2e/__snapshots__/schema.test.ts.snap b/e2e/__snapshots__/schema.test.ts.snap index 03b48ff3..8b96b88d 100644 --- a/e2e/__snapshots__/schema.test.ts.snap +++ b/e2e/__snapshots__/schema.test.ts.snap @@ -7,7 +7,7 @@ Object { "default": Object {}, "properties": Object { "$schema": Object { - "const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", }, "chaincodes": Object { "$id": "#/properties/chaincodes", diff --git a/fablo.sh b/fablo.sh index 6b361b89..35694e90 100755 --- a/fablo.sh +++ b/fablo.sh @@ -2,7 +2,7 @@ set -e -FABLO_VERSION="1.2.0" +FABLO_VERSION="1.2.1-unstable.0" FABLO_IMAGE_NAME="softwaremill/fablo" FABLO_IMAGE="$FABLO_IMAGE_NAME:$FABLO_VERSION" diff --git a/package-lock.json b/package-lock.json index e912599b..09320692 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "generator-fablo", - "version": "1.2.0", + "version": "1.2.1-unstable.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "generator-fablo", - "version": "1.2.0", + "version": "1.2.1-unstable.0", "license": "Apache-2.0", "dependencies": { "chalk": "^4.1.0", diff --git a/package.json b/package.json index fe972fab..d828b98c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "generator-fablo", - "version": "1.2.0", + "version": "1.2.1-unstable.0", "description": "Fablo is a simple tool to generate the Hyperledger Fabric blockchain network and run it on Docker. It supports RAFT and solo consensus protocols, multiple organizations and channels, chaincode installation and upgrade.", "author": "Piotr Hejwowski , Jakub Dzikowski ", "repository": { diff --git a/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json b/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json index 547eea26..6e106b6d 100644 --- a/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json +++ b/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "1.3.0", "tls": false diff --git a/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json b/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json index 3b357cd6..bd47697a 100644 --- a/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json +++ b/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "1.4.6", "tls": true, diff --git a/samples/fablo-config-hlf1.4-2orgs-1chaincode.json b/samples/fablo-config-hlf1.4-2orgs-1chaincode.json index 98cd99f2..cfc4d1d2 100644 --- a/samples/fablo-config-hlf1.4-2orgs-1chaincode.json +++ b/samples/fablo-config-hlf1.4-2orgs-1chaincode.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "1.4.6", "tls": false diff --git a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml b/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml index 7c3ecd9c..844191ba 100644 --- a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml +++ b/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml @@ -1,5 +1,5 @@ --- -"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json +"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json global: fabricVersion: 1.4.11 tls: false diff --git a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json b/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json index ed8ab19e..e20d735a 100644 --- a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json +++ b/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "1.4.6", "tls": true diff --git a/samples/fablo-config-hlf2-1org-1chaincode-k8s.json b/samples/fablo-config-hlf2-1org-1chaincode-k8s.json index a93be7b3..04798481 100644 --- a/samples/fablo-config-hlf2-1org-1chaincode-k8s.json +++ b/samples/fablo-config-hlf2-1org-1chaincode-k8s.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "2.4.7", "tls": false, diff --git a/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json b/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json index 7c3611c1..8c0886b4 100644 --- a/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json +++ b/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "2.3.3", "tls": true, diff --git a/samples/fablo-config-hlf2-1org-1chaincode.json b/samples/fablo-config-hlf2-1org-1chaincode.json index ae60e60f..2aecb739 100644 --- a/samples/fablo-config-hlf2-1org-1chaincode.json +++ b/samples/fablo-config-hlf2-1org-1chaincode.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "2.4.7", "tls": false diff --git a/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml b/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml index 24797cef..c150b9d6 100644 --- a/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml +++ b/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml @@ -1,5 +1,5 @@ --- -"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json +"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json global: fabricVersion: 2.4.3 tls: true diff --git a/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json b/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json index df3a6069..42b60d1c 100644 --- a/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json +++ b/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "2.3.2", "tls": true, From 05e1e30f5d049ada84bee0f8879f6959d1618182 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 26 Sep 2023 15:07:56 +0200 Subject: [PATCH 29/83] Update FABLO_VERSION replace pattern Signed-off-by: Jakub Dzikowski --- bump-version.sh | 4 ++-- ...fig-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap | 2 +- ...fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap | 2 +- .../fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 2 +- ...ig-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap | 2 +- ...blo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap | 2 +- .../fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap | 2 +- ...onfig-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap | 2 +- .../fablo-config-hlf2-1org-1chaincode.json.test.ts.snap | 2 +- ...fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 2 +- ...nfig-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap | 2 +- fablo.sh | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bump-version.sh b/bump-version.sh index c2c83c49..2aaadd53 100755 --- a/bump-version.sh +++ b/bump-version.sh @@ -21,8 +21,8 @@ npm version "$new_version" --no-git-tag-version > /dev/null echo "done" echo -n " - FABLO_VERSION... " -perl -i -pe "s/FABLO_VERSION=\"[^\"]*\"/FABLO_VERSION=\"${new_version}\"/g" fablo.sh -perl -i -pe "s/FABLO_VERSION=\"[^\"]*\"/FABLO_VERSION=\"${new_version}\"/g" e2e/__snapshots__/* +perl -i -pe "s/FABLO_VERSION=.*\\n/FABLO_VERSION=${new_version}\\n/g" fablo.sh +perl -i -pe "s/FABLO_VERSION=.*\\n/FABLO_VERSION=${new_version}\\n/g" e2e/__snapshots__/* echo "done" echo -n " - JSON schema URL... " diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index 44bfa016..8a252baf 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -2086,7 +2086,7 @@ fi `; exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index 13a75998..5a556a57 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -1497,7 +1497,7 @@ fi `; exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index eb88e152..f5017e09 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -2112,7 +2112,7 @@ fi `; exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index 51c4b037..468e5f16 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -2093,7 +2093,7 @@ fi `; exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index f9e833ec..dea28f9e 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -2283,7 +2283,7 @@ fi `; exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap index c910c780..93cdf9af 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap @@ -86,7 +86,7 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper REPOSITORY=\\"https://kfsoftware.github.io/hlf-helm-charts\\" STORAGE_CLASS=$(kubectl describe sc | grep Name | tr -s ' ' | cut -d ':' -f 2 | cut -d ' ' -f 2) -FABLO_VERSION=1.2.0 +FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_CONFIG= ORDERER_IMAGE=hyperledger/fabric-orderer diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 409d3141..4c703b5d 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1524,7 +1524,7 @@ fi `; exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index ca25269e..136703a1 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1434,7 +1434,7 @@ fi `; exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 877a2076..c8e43da3 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -3021,7 +3021,7 @@ fi `; exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index cc01cf6d..cd7e1db7 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -3316,7 +3316,7 @@ fi `; exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` -"FABLO_VERSION=1.2.0 +"FABLO_VERSION=1.2.1-unstable.0 FABLO_BUILD= FABLO_REST_VERSION=0.1.0 HYPERLEDGER_EXPLORER_VERSION=1.1.8 diff --git a/fablo.sh b/fablo.sh index 35694e90..ee5107ad 100755 --- a/fablo.sh +++ b/fablo.sh @@ -2,7 +2,7 @@ set -e -FABLO_VERSION="1.2.1-unstable.0" +FABLO_VERSION=1.2.1-unstable.0 FABLO_IMAGE_NAME="softwaremill/fablo" FABLO_IMAGE="$FABLO_IMAGE_NAME:$FABLO_VERSION" From 5b9ebbd142d6c6a182e50059d0556b362c5d9e30 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 26 Sep 2023 15:25:44 +0200 Subject: [PATCH 30/83] Include missing file for schema url change Signed-off-by: Jakub Dzikowski --- bump-version.sh | 1 + docs/sample.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bump-version.sh b/bump-version.sh index 2aaadd53..9bacd2e2 100755 --- a/bump-version.sh +++ b/bump-version.sh @@ -28,6 +28,7 @@ echo "done" echo -n " - JSON schema URL... " schema_update_pattern="s/download\/[0-9-.a-zA-Z]*\/schema.json/download\/${new_version}\/schema.json/g" perl -i -pe "$schema_update_pattern" README.md +perl -i -pe "$schema_update_pattern" docs/sample.json perl -i -pe "$schema_update_pattern" docs/schema.json perl -i -pe "$schema_update_pattern" samples/*.json perl -i -pe "$schema_update_pattern" samples/*.yaml diff --git a/docs/sample.json b/docs/sample.json index 9fa2bd0a..4f31cb0f 100644 --- a/docs/sample.json +++ b/docs/sample.json @@ -1,5 +1,5 @@ { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { "fabricVersion": "2.3.2", "tls": false, From ac328ea452ed83d42a2ab6952e37f292fb15d9db Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Fri, 13 Oct 2023 14:21:52 +0200 Subject: [PATCH 31/83] Skip automatic version updates in README Signed-off-by: Jakub Dzikowski --- README.md | 8 ++++---- bump-version.sh | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 01633b8f..c04c984b 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ You may keep the script in the root directory of your project or install it glob To install it globally: ```bash -sudo curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/fablo.sh -o /usr/local/bin/fablo && sudo chmod +x /usr/local/bin/fablo +sudo curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/fablo.sh -o /usr/local/bin/fablo && sudo chmod +x /usr/local/bin/fablo ``` To get a copy of Fablo for a single project, execute in the project root: ```bash -curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/fablo.sh -o ./fablo && chmod +x ./fablo +curl -Lf https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/fablo.sh -o ./fablo && chmod +x ./fablo ``` ## Getting started @@ -325,7 +325,7 @@ The basic structure of Fablo config file is as follows: ```json { - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json", "global": { ... }, "orgs": [ ... ], "channels": [ ... ], @@ -488,7 +488,7 @@ Genrated Hooks are saved in `fablo-target/hooks`. ```yaml --- -"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json +"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.0/schema.json global: fabricVersion: 2.4.2 tls: false diff --git a/bump-version.sh b/bump-version.sh index 9bacd2e2..288b0f36 100755 --- a/bump-version.sh +++ b/bump-version.sh @@ -27,7 +27,7 @@ echo "done" echo -n " - JSON schema URL... " schema_update_pattern="s/download\/[0-9-.a-zA-Z]*\/schema.json/download\/${new_version}\/schema.json/g" -perl -i -pe "$schema_update_pattern" README.md +#perl -i -pe "$schema_update_pattern" README.md perl -i -pe "$schema_update_pattern" docs/sample.json perl -i -pe "$schema_update_pattern" docs/schema.json perl -i -pe "$schema_update_pattern" samples/*.json @@ -37,5 +37,5 @@ echo "done" echo -n " - download URL... " download_update_pattern="s/download\/[0-9-.a-zA-Z]*\/fablo.sh/download\/${new_version}\/fablo.sh/g" -perl -i -pe "$download_update_pattern" README.md +#perl -i -pe "$download_update_pattern" README.md echo "done" \ No newline at end of file From cc7a58bca2b37531a82425eb6ae07dec3520245b Mon Sep 17 00:00:00 2001 From: jnjerin Date: Tue, 17 Oct 2023 14:42:24 +0300 Subject: [PATCH 32/83] code styling and peer tag update Signed-off-by: jnjerin --- e2e-network/docker/expect-invoke-cli.sh | 2 +- .../scripts/chaincode-functions-v2.sh | 23 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/e2e-network/docker/expect-invoke-cli.sh b/e2e-network/docker/expect-invoke-cli.sh index 7496c3d3..f2ffcfba 100755 --- a/e2e-network/docker/expect-invoke-cli.sh +++ b/e2e-network/docker/expect-invoke-cli.sh @@ -9,7 +9,7 @@ transient_default="{}" transient="${6:-$transient_default}" if [ -z "$expected" ]; then - echo "Usage: ./expect-invoke.sh [peers[,peers]] [channel] [chaincode] [command] [expected_substring] [transient_data]" + echo "Usage: ./expect-invoke.sh [peer[,peer]] [channel] [chaincode] [command] [expected_substring] [transient_data]" exit 1 fi diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index 74f86afa..50010e6d 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -299,12 +299,12 @@ peerChaincodeList() { local CHANNEL_NAME=$3 echo "Chaincodes list:" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" inputLog "CHANNEL_NAME: $CHANNEL_NAME" # Execute the command to list chaincodes docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \ - --channelID "$CHANNEL_NAME" + --channelID "$CHANNEL_NAME" } peerChaincodeListTls() { @@ -314,11 +314,10 @@ peerChaincodeListTls() { local CA_CERT=$4 echo "Chaincodes list:" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" inputLog "CHANNEL_NAME: $CHANNEL_NAME" inputLog "CA_CERT: $CA_CERT" - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \ --channelID "$CHANNEL_NAME" \ --tls \ @@ -342,10 +341,10 @@ peerChaincodeInvoke() { inputLog "COMMAND: $COMMAND" inputLog "TRANSIENT: $TRANSIENT" - PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" -# shellcheck disable=SC2086 - docker exec "$CLI" peer chaincode invoke \ + # shellcheck disable=SC2086 + docker exec "$CLI" peer chaincode invoke \ $PEER_ADDRESSES \ -C "$CHANNEL" \ -n "$CHAINCODE" \ @@ -353,10 +352,10 @@ peerChaincodeInvoke() { --transient "$TRANSIENT" \ --waitForEvent \ --waitForEventTimeout 90s \ - 2>&1 + 2>&1 } # Function to perform chaincode invoke for Tls -peerChaincodeInvokeTls () { +peerChaincodeInvokeTls() { local CLI="$1" local PEERS="$2" local CHANNEL="$3" @@ -376,11 +375,11 @@ peerChaincodeInvokeTls () { inputLog "PEER_CERTS: $PEER_CERTS" inputLog "CA_CERT: $CA_CERT" -PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" -TLS_ROOT_CERT_FILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$PEER_CERTS" | sed 's/,/ --tlsRootCertFiles \/var\/hyperledger\/cli\//g')" + TLS_ROOT_CERT_FILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$PEER_CERTS" | sed 's/,/ --tlsRootCertFiles \/var\/hyperledger\/cli\//g')" -# shellcheck disable=SC2086 + # shellcheck disable=SC2086 docker exec "$CLI" peer chaincode invoke \ $PEER_ADDRESSES \ $TLS_ROOT_CERT_FILES \ From 0546fba3dce13e780bdebb07ab7d3efc20b1b48e Mon Sep 17 00:00:00 2001 From: jnjerin Date: Tue, 24 Oct 2023 09:48:34 +0300 Subject: [PATCH 33/83] updated documentation for new features Signed-off-by: jnjerin --- CHANGELOG.md | 2 +- README.md | 15 +++++++++++++++ fablo.sh | 6 ++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e4045c2..777ed0ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ### Features * Initial support for Kubernetes -* Basic support for `chaincode invoke` command +* Support for `chaincode invoke` command (tls and non-tls) * Support for `chaincodes list` command (tls and non-tls) ### Fixes diff --git a/README.md b/README.md index c04c984b..aaffe660 100644 --- a/README.md +++ b/README.md @@ -209,6 +209,21 @@ fablo chaincode upgrade Upgrades chaincode with given name on all relevant peers. Chaincode directory is specified in Fablo config file. +### chaincode invoke +Invokes chaincode with specified parameters. + +``` +fablo chaincode invoke +``` + +### chaincodes list +Gets the instantiated or installed chaincodes in the specified channel or peer channel. + + +``` +fablo chaincodes list +``` + ### Running chaincodes in dev mode Hyperledger Fabric allows to run peers in [dev mode](https://hyperledger-fabric.readthedocs.io/en/release-2.4/peer-chaincode-devmode.html) in order to allow simple develop of chaincodes. diff --git a/fablo.sh b/fablo.sh index ee5107ad..c6fde7b8 100755 --- a/fablo.sh +++ b/fablo.sh @@ -84,6 +84,12 @@ printHelp() { fablo chaincode upgrade Upgrades chaincode on all relevant peers. Chaincode directory is specified in Fablo config file. + fablo chaincode invoke + Invokes chaincode with specified parameters. + + fablo chaincodes list + Lists chaincodes installed on specified peer and channel. + fablo channel --help To list available channel query options which can be executed on running network. From 5b8ce14c495b8b3ad4e19cee1b60a9d6c503975b Mon Sep 17 00:00:00 2001 From: jnjerin Date: Tue, 24 Oct 2023 12:59:39 +0300 Subject: [PATCH 34/83] included sample code on README Signed-off-by: jnjerin --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aaffe660..7e5a1919 100644 --- a/README.md +++ b/README.md @@ -213,11 +213,16 @@ Chaincode directory is specified in Fablo config file. Invokes chaincode with specified parameters. ``` -fablo chaincode invoke +fablo chaincode invoke [transient] +``` +Sample command: + +``` +fablo chaincode invoke "my-channel1" "chaincode1" "peer0.org1.example.com" '{"Args":["KVContract:put", "name", "Willy Wonka"]}' ``` ### chaincodes list -Gets the instantiated or installed chaincodes in the specified channel or peer channel. +Gets the instantiated or installed chaincodes in the specified channel or peer. ``` From 5e6b45959de679dad6b4e1d705facfdfbf2471d2 Mon Sep 17 00:00:00 2001 From: jnjerin Date: Wed, 25 Oct 2023 08:17:57 +0300 Subject: [PATCH 35/83] standardized styling on README Signed-off-by: jnjerin --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 7e5a1919..d8d6c084 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,7 @@ Chaincode directory is specified in Fablo config file. Invokes chaincode with specified parameters. ``` -fablo chaincode invoke [transient] +fablo chaincode invoke [transient] ``` Sample command: @@ -224,7 +224,6 @@ fablo chaincode invoke "my-channel1" "chaincode1" "peer0.org1.example.com" '{"Ar ### chaincodes list Gets the instantiated or installed chaincodes in the specified channel or peer. - ``` fablo chaincodes list ``` From 88d95405910418c2e6cbb57a09560c8f367a1912 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Fri, 10 Nov 2023 14:26:01 +0100 Subject: [PATCH 36/83] Publish on merge to main Signed-off-by: Jakub Dzikowski --- .github/workflows/publish-docker-on-main.yml | 35 ++++++++++++++++++++ .github/workflows/test-on-push.yml | 1 + 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/publish-docker-on-main.yml diff --git a/.github/workflows/publish-docker-on-main.yml b/.github/workflows/publish-docker-on-main.yml new file mode 100644 index 00000000..24369d11 --- /dev/null +++ b/.github/workflows/publish-docker-on-main.yml @@ -0,0 +1,35 @@ +name: Publish on merge to main + +on: + push: + branches: + - main + +env: + IMAGE_NAME: softwaremill/fablo + +jobs: + publish-docker: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build Fablo + run: | + shellcheck --version + yamllint -v + npm install + ./fablo-build.sh + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_LOGIN }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Publish Docker image + run: | + FABLO_VERSION=$(jq -r '.version' <"$GITHUB_WORKSPACE/package.json") + docker push softwaremill/fablo:"$FABLO_VERSION" diff --git a/.github/workflows/test-on-push.yml b/.github/workflows/test-on-push.yml index 1bede8b5..34bc074b 100644 --- a/.github/workflows/test-on-push.yml +++ b/.github/workflows/test-on-push.yml @@ -39,6 +39,7 @@ jobs: - name: Lint run: npm run lint && ./lint.sh + test-k8: needs: test-main runs-on: ubuntu-latest From aedf88bd48751c07d55ef6d26a203c3a309c7ba7 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Fri, 17 Nov 2023 15:43:45 +0100 Subject: [PATCH 37/83] Allow to set version explicitly Signed-off-by: Jakub Dzikowski --- bump-version.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/bump-version.sh b/bump-version.sh index 288b0f36..e185c675 100755 --- a/bump-version.sh +++ b/bump-version.sh @@ -3,15 +3,21 @@ set -eu old_version=$(< package.json jq -r '.version') +include_readme=true ver_arg="${1:-unstable}" if [ "$ver_arg" = "patch" ] || [ "$ver_arg" = "minor" ] || [ "$ver_arg" = "major" ]; then new_version=$(semver "$old_version" -i "$ver_arg") elif [ "$ver_arg" = "unstable" ]; then new_version=$(semver "$old_version" -i prerelease --preid unstable) + include_readme=false +elif [ "$ver_arg" = "set" ]; then + new_version="$2" else echo "Invalid version parameter: $ver_arg" - echo "Usage: $0 [patch|minor|major|unstable]" + echo "Usage:" + echo " $0 " + echo " $0 set " exit 1 fi @@ -27,7 +33,9 @@ echo "done" echo -n " - JSON schema URL... " schema_update_pattern="s/download\/[0-9-.a-zA-Z]*\/schema.json/download\/${new_version}\/schema.json/g" -#perl -i -pe "$schema_update_pattern" README.md +if [ "$include_readme" = true ]; then + perl -i -pe "$schema_update_pattern" README.md +fi perl -i -pe "$schema_update_pattern" docs/sample.json perl -i -pe "$schema_update_pattern" docs/schema.json perl -i -pe "$schema_update_pattern" samples/*.json @@ -35,7 +43,9 @@ perl -i -pe "$schema_update_pattern" samples/*.yaml perl -i -pe "$schema_update_pattern" e2e/__snapshots__/* echo "done" -echo -n " - download URL... " -download_update_pattern="s/download\/[0-9-.a-zA-Z]*\/fablo.sh/download\/${new_version}\/fablo.sh/g" -#perl -i -pe "$download_update_pattern" README.md -echo "done" \ No newline at end of file +if [ "$include_readme" = true ]; then + echo -n " - download URL... " + download_update_pattern="s/download\/[0-9-.a-zA-Z]*\/fablo.sh/download\/${new_version}\/fablo.sh/g" + perl -i -pe "$download_update_pattern" README.md + echo "done" +fi From c0cbcf573d383f204fd506fcd4f128e501f832ac Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Fri, 17 Nov 2023 15:44:03 +0100 Subject: [PATCH 38/83] Add release on tag pipeline Signed-off-by: Jakub Dzikowski --- .github/workflows/release-on-tag.yml | 60 ++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/release-on-tag.yml diff --git a/.github/workflows/release-on-tag.yml b/.github/workflows/release-on-tag.yml new file mode 100644 index 00000000..dbe05119 --- /dev/null +++ b/.github/workflows/release-on-tag.yml @@ -0,0 +1,60 @@ +name: Release on tag + +on: + push: + tags: + - 'v*.*.*' + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set version from tag and update tag + run: | + TAG=$(git describe --tags --abbrev=0) + VERSION=${TAG:1} + echo "TAG: $TAG" + echo "VERSION: $VERSION" + ./bump_version.sh set "$VERSION" + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git commit -a -m "Set version from tag: $TAG" + git tag -a "$TAG" -m "Release $TAG" + git push origin "$TAG" + + - name: Build Fablo + run: | + shellcheck --version + yamllint -v + npm install + ./fablo-build.sh + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_LOGIN }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Publish Docker image + run: | + FABLO_VERSION=$(jq -r '.version' <"$GITHUB_WORKSPACE/package.json") + docker push softwaremill/fablo:"$FABLO_VERSION" + + - name: Create GitHub Release + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + files: | + docs/schema.json + fablo.sh + + - name: Set next development version + run: | + ./bump_version.sh unstable + git commit -a -m "Set new development version: $NEW_VERSION" + git push origin HEAD From 83de118d52e93bf0e6c82e640a7bfc728b5edd29 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Fri, 24 Nov 2023 14:41:34 +0100 Subject: [PATCH 39/83] Fix CI by upgrading yeoman-generator to 5.10.0 Signed-off-by: Jakub Dzikowski --- Dockerfile | 2 +- e2e-network/docker/test-01-simple.sh | 1 - package-lock.json | 21687 ++++++++++++++----------- package.json | 4 +- 4 files changed, 12490 insertions(+), 9204 deletions(-) diff --git a/Dockerfile b/Dockerfile index bff5039d..057d4a9b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine3.14 +FROM node:18-alpine3.16 RUN apk add --no-cache sudo shfmt RUN npm install --global --silent yo diff --git a/e2e-network/docker/test-01-simple.sh b/e2e-network/docker/test-01-simple.sh index 1daac214..2538e93c 100755 --- a/e2e-network/docker/test-01-simple.sh +++ b/e2e-network/docker/test-01-simple.sh @@ -2,7 +2,6 @@ set -e - TEST_TMP="$(rm -rf "$0.tmpdir" && mkdir -p "$0.tmpdir" && (cd "$0.tmpdir" && pwd))" TEST_LOGS="$(mkdir -p "$0.logs" && (cd "$0.logs" && pwd))" FABLO_HOME="$TEST_TMP/../../.." diff --git a/package-lock.json b/package-lock.json index 09320692..301cb222 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "js-yaml": "^4.1.0", "jsonschema": "^1.2.6", "lodash": "^4.17.21", - "yeoman-generator": "^5.7.0" + "yeoman-generator": "^5.10.0" }, "devDependencies": { "@types/jest": "^27.0.1", @@ -22,7 +22,7 @@ "@types/js-yaml": "^4.0.1", "@types/lodash": "^4.14.168", "@types/node-fetch": "^2.5.10", - "@types/yeoman-generator": "^4.11.3", + "@types/yeoman-generator": "^5.2.14", "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.22.0", "copyfiles": "2.4.1", @@ -694,9 +694,96 @@ "node_modules/@gar/promisify": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "devOptional": true, - "peer": true + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } }, "node_modules/@isaacs/string-locale-compare": { "version": "1.1.0", @@ -1056,7 +1143,6 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "devOptional": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -1069,7 +1155,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "devOptional": true, "engines": { "node": ">= 8" } @@ -1078,7 +1163,6 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "devOptional": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -1452,6 +1536,302 @@ "@octokit/openapi-types": "^12.11.0" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@sigstore/bundle": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-1.1.0.tgz", + "integrity": "sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog==", + "dependencies": { + "@sigstore/protobuf-specs": "^0.2.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/protobuf-specs": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz", + "integrity": "sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-1.0.0.tgz", + "integrity": "sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA==", + "dependencies": { + "@sigstore/bundle": "^1.1.0", + "@sigstore/protobuf-specs": "^0.2.0", + "make-fetch-happen": "^11.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign/node_modules/@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@sigstore/sign/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@sigstore/sign/node_modules/cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign/node_modules/cacache/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/@sigstore/sign/node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign/node_modules/fs-minipass/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/@sigstore/sign/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@sigstore/sign/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@sigstore/sign/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/@sigstore/sign/node_modules/make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@sigstore/sign/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@sigstore/sign/node_modules/minipass-fetch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/@sigstore/sign/node_modules/minipass-fetch/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/@sigstore/sign/node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/@sigstore/sign/node_modules/ssri": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign/node_modules/ssri/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/@sigstore/sign/node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/sign/node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@sigstore/tuf": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-1.0.3.tgz", + "integrity": "sha512-2bRovzs0nJZFlCN3rXirE4gwxCn97JNjMmwpecqlbgV9WcxX7WRuIrgzx/X7Ib7MYRbyUTpBYE0s2x6AmZXnlg==", + "dependencies": { + "@sigstore/protobuf-specs": "^0.2.0", + "tuf-js": "^1.1.7" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/@sindresorhus/is": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", @@ -1518,24 +1898,66 @@ "node": ">= 6" } }, - "node_modules/@types/babel__core": { - "version": "7.1.14", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz", - "integrity": "sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" + "node_modules/@tufjs/canonical-json": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz", + "integrity": "sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@types/babel__generator": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", - "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", - "dev": true, + "node_modules/@tufjs/models": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-1.0.4.tgz", + "integrity": "sha512-qaGV9ltJP0EO25YfFUPhxRVK0evXFIAGicsVXuRim4Ed9cjPxYhNnNJ49SFmbeLgtxpslIkX317IgpfcHPVj/A==", + "dependencies": { + "@tufjs/canonical-json": "1.0.0", + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/@tufjs/models/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@tufjs/models/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@types/babel__core": { + "version": "7.1.14", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz", + "integrity": "sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", + "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", + "dev": true, "dependencies": { "@babel/types": "^7.0.0" } @@ -1648,15 +2070,30 @@ "integrity": "sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==" }, "node_modules/@types/inquirer": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-7.3.1.tgz", - "integrity": "sha512-osD38QVIfcdgsPCT0V3lD7eH0OFurX71Jft18bZrsVQWVRt6TuxRzlr0GJLrxoHZR2V5ph7/qP8se/dcnI7o0g==", + "version": "8.2.10", + "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-8.2.10.tgz", + "integrity": "sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==", "dev": true, "dependencies": { "@types/through": "*", - "rxjs": "^6.4.0" + "rxjs": "^7.2.0" + } + }, + "node_modules/@types/inquirer/node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" } }, + "node_modules/@types/inquirer/node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", @@ -1850,8 +2287,7 @@ "node_modules/@types/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==", - "devOptional": true + "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==" }, "node_modules/@types/node": { "version": "15.14.7", @@ -1949,15 +2385,16 @@ } }, "node_modules/@types/yeoman-generator": { - "version": "4.11.4", - "resolved": "https://registry.npmjs.org/@types/yeoman-generator/-/yeoman-generator-4.11.4.tgz", - "integrity": "sha512-JB0rxFS8oskkKLALii9y3Tb6DQaLQ/bxBU6nUIAh9e/47T1PvVODfMlj1Hkxrw/rzNhgGOzkG/xiOHL5EsqCag==", + "version": "5.2.14", + "resolved": "https://registry.npmjs.org/@types/yeoman-generator/-/yeoman-generator-5.2.14.tgz", + "integrity": "sha512-eIYBqQyURXiAaoU6jvJqMI+tNSG4s7EXtcHucLCgb8EV2vqz4x1WPr91MT0MiWHV8+9dDRrMkc1VZ6LduexuyA==", "dev": true, "dependencies": { "@types/debug": "*", "@types/ejs": "*", - "@types/inquirer": "*", + "@types/inquirer": "^8", "@types/mem-fs-editor": "*", + "@types/node": "*", "@types/yeoman-environment": "*", "rxjs": "^6.4.0" } @@ -2303,9 +2740,7 @@ "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "devOptional": true, - "peer": true + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "node_modules/acorn": { "version": "7.4.1", @@ -2362,7 +2797,6 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "devOptional": true, "dependencies": { "debug": "4" }, @@ -2374,8 +2808,6 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", - "devOptional": true, - "peer": true, "dependencies": { "debug": "^4.1.0", "depd": "^1.1.2", @@ -2389,8 +2821,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "devOptional": true, - "peer": true, "dependencies": { "clean-stack": "^2.0.0", "indent-string": "^4.0.0" @@ -2465,7 +2895,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "devOptional": true, "engines": { "node": ">=8" } @@ -2506,9 +2935,7 @@ "node_modules/aproba": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "devOptional": true, - "peer": true + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" }, "node_modules/are-we-there-yet": { "version": "2.0.0", @@ -2626,7 +3053,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", - "devOptional": true, "engines": { "node": ">=8" } @@ -2654,7 +3080,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "devOptional": true, "engines": { "node": ">=8" } @@ -2708,7 +3133,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "devOptional": true, "engines": { "node": ">=8" } @@ -2754,8 +3178,7 @@ "node_modules/async": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "devOptional": true + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" }, "node_modules/asynckit": { "version": "0.4.0", @@ -2990,8 +3413,6 @@ "version": "4.18.0", "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-4.18.0.tgz", "integrity": "sha512-PQu3Kyv9dM4FnwB7XGj1+HucW+ShvJzJqjuw1JkKVs1mWdwOKVcRjOi+pV9X52A0tNvrPCsPkbFFQb+wE1EAXw==", - "devOptional": true, - "peer": true, "engines": { "node": ">=0.8" }, @@ -3066,7 +3487,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -3319,8 +3739,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "devOptional": true, - "peer": true, "engines": { "node": ">=10" } @@ -3449,8 +3867,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "devOptional": true, - "peer": true, "engines": { "node": ">=6" } @@ -3654,8 +4070,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "devOptional": true, - "peer": true, "bin": { "color-support": "bin.js" } @@ -3707,8 +4121,7 @@ "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "devOptional": true + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, "node_modules/component-emitter": { "version": "1.3.0", @@ -3742,9 +4155,7 @@ "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "devOptional": true, - "peer": true + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" }, "node_modules/contains-path": { "version": "0.1.0", @@ -3984,7 +4395,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "devOptional": true, "engines": { "node": ">=4.0.0" } @@ -4071,16 +4481,12 @@ "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "devOptional": true, - "peer": true + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" }, "node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "devOptional": true, - "peer": true, "engines": { "node": ">= 0.6" } @@ -4304,7 +4710,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "devOptional": true, "dependencies": { "path-type": "^4.0.0" }, @@ -4345,6 +4750,11 @@ "node": ">=8" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + }, "node_modules/ejs": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", @@ -4406,15 +4816,13 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "devOptional": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/encoding": { "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "optional": true, - "peer": true, "dependencies": { "iconv-lite": "^0.6.2" } @@ -4424,7 +4832,6 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "optional": true, - "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -4469,8 +4876,6 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "devOptional": true, - "peer": true, "engines": { "node": ">=6" } @@ -4478,9 +4883,7 @@ "node_modules/err-code": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "devOptional": true, - "peer": true + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" }, "node_modules/error": { "version": "10.4.0", @@ -5441,6 +5844,11 @@ "node": ">= 10.14.2" } }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" + }, "node_modules/extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -5536,7 +5944,6 @@ "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "devOptional": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -5564,7 +5971,6 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "devOptional": true, "dependencies": { "reusify": "^1.0.4" } @@ -5618,7 +6024,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "devOptional": true, "dependencies": { "minimatch": "^5.0.1" } @@ -5627,7 +6032,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "devOptional": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -5636,7 +6040,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", - "devOptional": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -5694,7 +6097,6 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -5819,6 +6221,32 @@ "node": ">=0.10.0" } }, + "node_modules/foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", @@ -5849,8 +6277,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "devOptional": true, - "peer": true, "dependencies": { "minipass": "^3.0.0" }, @@ -6072,7 +6498,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -6099,7 +6524,6 @@ "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "devOptional": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -6119,7 +6543,6 @@ "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "devOptional": true, "engines": { "node": ">= 4" } @@ -6166,8 +6589,7 @@ "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "devOptional": true + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, "node_modules/graphviz": { "version": "0.0.9", @@ -6268,9 +6690,7 @@ "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "devOptional": true, - "peer": true + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" }, "node_modules/has-value": { "version": "1.0.0", @@ -6359,9 +6779,9 @@ "dev": true }, "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" }, "node_modules/http-proxy-agent": { "version": "4.0.1", @@ -6393,7 +6813,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "devOptional": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -6415,8 +6834,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "devOptional": true, - "peer": true, "dependencies": { "ms": "^2.0.0" } @@ -6523,7 +6940,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "devOptional": true, "engines": { "node": ">=0.8.19" } @@ -6532,8 +6948,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "devOptional": true, - "peer": true, "engines": { "node": ">=8" } @@ -6547,9 +6961,7 @@ "node_modules/infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "devOptional": true, - "peer": true + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" }, "node_modules/inflight": { "version": "1.0.6", @@ -6620,9 +7032,7 @@ "node_modules/ip": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", - "devOptional": true, - "peer": true + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" }, "node_modules/is-accessor-descriptor": { "version": "1.0.0", @@ -6780,7 +7190,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -6789,7 +7198,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "devOptional": true, "engines": { "node": ">=8" } @@ -6807,7 +7215,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "devOptional": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -6827,9 +7234,7 @@ "node_modules/is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "devOptional": true, - "peer": true + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" }, "node_modules/is-negative-zero": { "version": "2.0.2", @@ -6847,7 +7252,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true, "engines": { "node": ">=0.12.0" } @@ -7071,7 +7475,6 @@ "version": "4.0.10", "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", - "devOptional": true, "engines": { "node": ">= 8.0.0" }, @@ -7167,11 +7570,27 @@ "node": ">=8" } }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jake": { "version": "10.8.5", "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.5.tgz", "integrity": "sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==", - "devOptional": true, "dependencies": { "async": "^3.2.3", "chalk": "^4.0.2", @@ -8087,11 +8506,9 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "devOptional": true, "engines": [ "node >= 0.2.0" - ], - "peer": true + ] }, "node_modules/jsonschema": { "version": "1.4.0", @@ -8543,8 +8960,6 @@ "version": "9.5.0", "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-9.5.0.tgz", "integrity": "sha512-7p+bBDqsSisO20YIZf2ntYvST27fFJINn7CKE21XdPUQDcLV62b/yB5sTOooQeEoiZ3rldZQ+4RfONgL/gbRoA==", - "devOptional": true, - "peer": true, "dependencies": { "binaryextensions": "^4.16.0", "commondir": "^1.0.1", @@ -8573,8 +8988,6 @@ "version": "3.1.8", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", - "devOptional": true, - "peer": true, "dependencies": { "jake": "^10.8.5" }, @@ -8594,7 +9007,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "devOptional": true, "engines": { "node": ">= 8" } @@ -8603,7 +9015,6 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "devOptional": true, "dependencies": { "braces": "^3.0.1", "picomatch": "^2.2.3" @@ -8669,8 +9080,6 @@ "version": "3.3.6", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "devOptional": true, - "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -8682,8 +9091,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "devOptional": true, - "peer": true, "dependencies": { "minipass": "^3.0.0" }, @@ -8713,8 +9120,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "devOptional": true, - "peer": true, "dependencies": { "minipass": "^3.0.0" }, @@ -8726,8 +9131,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", - "devOptional": true, - "peer": true, "dependencies": { "jsonparse": "^1.3.1", "minipass": "^3.0.0" @@ -8737,8 +9140,6 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "devOptional": true, - "peer": true, "dependencies": { "minipass": "^3.0.0" }, @@ -8750,8 +9151,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "devOptional": true, - "peer": true, "dependencies": { "minipass": "^3.0.0" }, @@ -8763,8 +9162,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "devOptional": true, - "peer": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -8790,7 +9187,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "devOptional": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -8863,7 +9259,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-5.0.0.tgz", "integrity": "sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==", - "devOptional": true, "dependencies": { "@types/minimatch": "^3.0.3", "array-differ": "^3.0.0", @@ -8928,8 +9323,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "devOptional": true, - "peer": true, "engines": { "node": ">= 0.6" } @@ -9216,7 +9609,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -9954,8 +10346,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "devOptional": true, - "peer": true, "dependencies": { "aggregate-error": "^3.0.0" }, @@ -10144,6 +10534,37 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dependencies": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/path-to-regexp": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", @@ -10157,7 +10578,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "devOptional": true, "engines": { "node": ">=8" } @@ -10166,7 +10586,6 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", - "devOptional": true, "engines": { "node": ">=8.6" }, @@ -10587,16 +11006,12 @@ "node_modules/promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", - "devOptional": true, - "peer": true + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==" }, "node_modules/promise-retry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "devOptional": true, - "peer": true, "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" @@ -10665,7 +11080,6 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "devOptional": true, "funding": [ { "type": "github", @@ -10748,6 +11162,20 @@ "integrity": "sha1-WzFpMIATRk/9puyS5Y0tPOqUjfE=", "dev": true }, + "node_modules/read-package-json": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.4.tgz", + "integrity": "sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw==", + "dependencies": { + "glob": "^10.2.2", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/read-package-json-fast": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", @@ -10762,50 +11190,150 @@ "node": ">=10" } }, - "node_modules/read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, + "node_modules/read-package-json/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dependencies": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "engines": { - "node": ">=4" + "balanced-match": "^1.0.0" } }, - "node_modules/read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, + "node_modules/read-package-json/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=4" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, + "node_modules/read-package-json/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dependencies": { - "locate-path": "^2.0.0" + "lru-cache": "^7.5.1" }, "engines": { - "node": ">=4" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, + "node_modules/read-package-json/node_modules/json-parse-even-better-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-package-json/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/read-package-json/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/read-package-json/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/read-package-json/node_modules/normalize-package-data": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", + "dependencies": { + "hosted-git-info": "^6.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-package-json/node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "dependencies": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "dependencies": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, "dependencies": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -11135,8 +11663,6 @@ "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "devOptional": true, - "peer": true, "engines": { "node": ">= 4" } @@ -11145,7 +11671,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "devOptional": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -11155,7 +11680,6 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "devOptional": true, "dependencies": { "glob": "^7.1.3" }, @@ -11187,7 +11711,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "devOptional": true, "funding": [ { "type": "github", @@ -11622,8 +12145,7 @@ "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "devOptional": true + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "node_modules/set-value": { "version": "2.0.1", @@ -11722,6 +12244,267 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, + "node_modules/sigstore": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-1.9.0.tgz", + "integrity": "sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A==", + "dependencies": { + "@sigstore/bundle": "^1.1.0", + "@sigstore/protobuf-specs": "^0.2.0", + "@sigstore/sign": "^1.0.0", + "@sigstore/tuf": "^1.0.3", + "make-fetch-happen": "^11.0.1" + }, + "bin": { + "sigstore": "bin/sigstore.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/sigstore/node_modules/@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/sigstore/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/sigstore/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/sigstore/node_modules/cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/sigstore/node_modules/cacache/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sigstore/node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/sigstore/node_modules/fs-minipass/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sigstore/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sigstore/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/sigstore/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/sigstore/node_modules/make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/sigstore/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/sigstore/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/sigstore/node_modules/minipass-fetch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/sigstore/node_modules/minipass-fetch/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sigstore/node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/sigstore/node_modules/ssri": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/sigstore/node_modules/ssri/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sigstore/node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/sigstore/node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/sinon": { "version": "9.2.4", "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", @@ -11750,7 +12533,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "devOptional": true, "engines": { "node": ">=8" } @@ -11776,8 +12558,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "devOptional": true, - "peer": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" @@ -11984,8 +12764,6 @@ "version": "2.7.1", "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "devOptional": true, - "peer": true, "dependencies": { "ip": "^2.0.0", "smart-buffer": "^4.2.0" @@ -12254,7 +13032,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "devOptional": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -12264,12 +13041,26 @@ "node": ">=8" } }, - "node_modules/string.prototype.matchall": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz", - "integrity": "sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==", - "dev": true, - "peer": true, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.matchall": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz", + "integrity": "sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==", + "dev": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", @@ -12330,7 +13121,18 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "devOptional": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -12542,8 +13344,6 @@ "version": "6.1.13", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", - "devOptional": true, - "peer": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -12560,8 +13360,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", - "devOptional": true, - "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -12722,8 +13520,6 @@ "version": "5.15.0", "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-5.15.0.tgz", "integrity": "sha512-MeqZRHLuaGamUXGuVn2ivtU3LA3mLCCIO5kUGoohTCoGmCBg/+8yPhWVX9WSl9telvVd8erftjFk9Fwb2dD6rw==", - "devOptional": true, - "peer": true, "engines": { "node": ">=0.8" }, @@ -12853,7 +13649,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, "dependencies": { "is-number": "^7.0.0" }, @@ -13021,6 +13816,262 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, + "node_modules/tuf-js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", + "integrity": "sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg==", + "dependencies": { + "@tufjs/models": "1.0.4", + "debug": "^4.3.4", + "make-fetch-happen": "^11.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/tuf-js/node_modules/@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/tuf-js/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/tuf-js/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/tuf-js/node_modules/cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/tuf-js/node_modules/cacache/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/tuf-js/node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/tuf-js/node_modules/fs-minipass/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/tuf-js/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/tuf-js/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/tuf-js/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" + } + }, + "node_modules/tuf-js/node_modules/make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/tuf-js/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/tuf-js/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/tuf-js/node_modules/minipass-fetch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/tuf-js/node_modules/minipass-fetch/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/tuf-js/node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/tuf-js/node_modules/ssri": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/tuf-js/node_modules/ssri/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/tuf-js/node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/tuf-js/node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -13246,8 +14297,7 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "devOptional": true + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "node_modules/uuid": { "version": "8.3.2", @@ -13635,8 +14685,6 @@ "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "devOptional": true, - "peer": true, "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } @@ -13667,6 +14715,23 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -14012,9 +15077,9 @@ "peer": true }, "node_modules/yeoman-generator": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-5.7.0.tgz", - "integrity": "sha512-z9ZwgKoDOd+llPDCwn8Ax2l4In5FMhlslxdeByW4AMxhT+HbTExXKEAahsClHSbwZz1i5OzRwLwRIUdOJBr5Bw==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-5.10.0.tgz", + "integrity": "sha512-iDUKykV7L4nDNzeYSedRmSeJ5eMYFucnKDi6KN1WNASXErgPepKqsQw55TgXPHnmpcyOh2Dd/LAZkyc+f0qaAw==", "dependencies": { "chalk": "^4.1.0", "dargs": "^7.0.0", @@ -14022,7 +15087,9 @@ "execa": "^5.1.1", "github-username": "^6.0.0", "lodash": "^4.17.11", + "mem-fs-editor": "^9.0.0", "minimist": "^1.2.5", + "pacote": "^15.2.0", "read-pkg-up": "^7.0.1", "run-async": "^2.0.0", "semver": "^7.2.1", @@ -14030,6 +15097,9 @@ "sort-keys": "^4.2.0", "text-table": "^0.2.0" }, + "acceptDependencies": { + "yeoman-environment": "^4.0.0" + }, "engines": { "node": ">=12.10.0" }, @@ -14042,4463 +15112,4070 @@ } } }, - "node_modules/yeoman-generator/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "node_modules/yeoman-generator/node_modules/@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "semver": "^7.3.5" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/yeoman-generator/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "engines": { - "node": ">=10" + "node_modules/yeoman-generator/node_modules/@npmcli/git": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.1.0.tgz", + "integrity": "sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ==", + "dependencies": { + "@npmcli/promise-spawn": "^6.0.0", + "lru-cache": "^7.4.4", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yeoman-generator/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "engines": { - "node": ">=10.17.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/yeoman-generator/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "node_modules/yeoman-generator/node_modules/@npmcli/installed-package-contents": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", + "integrity": "sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==", "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" }, - "engines": { - "node": ">=8" + "bin": { + "installed-package-contents": "lib/index.js" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/yeoman-generator/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "node_modules/yeoman-generator/node_modules/@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "deprecated": "This functionality has been moved to @npmcli/fs", "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=8" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/yeoman-generator/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "node_modules/yeoman-generator/node_modules/@npmcli/node-gyp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/yeoman-generator/node_modules/@npmcli/promise-spawn": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", + "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" + "which": "^3.0.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/yeoman-generator/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "node_modules/yeoman-generator/node_modules/@npmcli/run-script": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.2.tgz", + "integrity": "sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA==", + "dependencies": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + }, "engines": { - "node": ">=8" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/yeoman-generator/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "node_modules/yeoman-generator/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "engines": { - "node": ">=8" + "node": ">= 10" } }, - "node_modules/yeoman-test": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/yeoman-test/-/yeoman-test-5.1.0.tgz", - "integrity": "sha512-lcXcNRleJrIhohoKcRwmj9i8JO0lsYTySprwCfgZV1THeHJRqUsBEhHVgMr7DVB+coMoIkxk99wpn/bsOvpz4w==", - "dev": true, + "node_modules/yeoman-generator/node_modules/are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", "dependencies": { - "inquirer": "^7.3.3", - "lodash": "^4.17.19", - "mem-fs-editor": "^8.0.0", - "sinon": "^9.0.2" + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" }, "engines": { - "node": ">=12.10.0" - }, - "peerDependencies": { - "yeoman-environment": "^3.0.0 || ^2.10.3", - "yeoman-generator": "*" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/yeoman-test/node_modules/mem-fs-editor": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-8.1.2.tgz", - "integrity": "sha512-owE6PKMRegrYb37Lsar3yLSwK9wLGvHkNIOzBO3ycFeoOwshdF8j593EqjU7ucFAf3ZvcFVwfpo8Q8LqgFQg0A==", - "dev": true, + "node_modules/yeoman-generator/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dependencies": { - "commondir": "^1.0.1", - "deep-extend": "^0.6.0", - "ejs": "^3.1.6", - "globby": "^11.0.2", - "isbinaryfile": "^4.0.0", - "multimatch": "^5.0.0", - "normalize-path": "^3.0.0" + "balanced-match": "^1.0.0" + } + }, + "node_modules/yeoman-generator/node_modules/builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "dependencies": { + "semver": "^7.0.0" + } + }, + "node_modules/yeoman-generator/node_modules/cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "dependencies": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" }, "engines": { - "node": ">=12.10.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/yeoman-generator/node_modules/cacache/node_modules/glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" }, - "peerDependencies": { - "mem-fs": "^1.2.0 || ^2.0.0" + "bin": { + "glob": "dist/esm/bin.mjs" }, - "peerDependenciesMeta": { - "mem-fs": { - "optional": true - } + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, + "node_modules/yeoman-generator/node_modules/cacache/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "engines": { - "node": ">=6" + "node": ">=16 || 14 >=14.17" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "devOptional": true, - "peer": true, + "node_modules/yeoman-generator/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sindresorhus/execa?sponsor=1" } - } - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "requires": { - "@babel/highlight": "^7.10.4" + }, + "node_modules/yeoman-generator/node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/compat-data": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz", - "integrity": "sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q==", - "dev": true + "node_modules/yeoman-generator/node_modules/fs-minipass/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } }, - "@babel/core": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.0.tgz", - "integrity": "sha512-8YqpRig5NmIHlMLw09zMlPTvUVMILjqCOtVgu+TVNWEBvy9b5I3RRyhqnrV4hjgEK7n8P9OqvkWJAFmEL6Wwfw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.14.0", - "@babel/helper-compilation-targets": "^7.13.16", - "@babel/helper-module-transforms": "^7.14.0", - "@babel/helpers": "^7.14.0", - "@babel/parser": "^7.14.0", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.14.0", - "@babel/types": "^7.14.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - }, + "node_modules/yeoman-generator/node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.12.13" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "@babel/generator": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz", - "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==", - "dev": true, - "requires": { - "@babel/types": "^7.14.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "node_modules/yeoman-generator/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yeoman-generator/node_modules/hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "lru-cache": "^7.5.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/helper-compilation-targets": { - "version": "7.13.16", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", - "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.13.15", - "@babel/helper-validator-option": "^7.12.17", - "browserslist": "^4.14.5", - "semver": "^6.3.0" - }, + "node_modules/yeoman-generator/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" } }, - "@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" + "node_modules/yeoman-generator/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "engines": { + "node": ">=10.17.0" } }, - "@babel/helper-get-function-arity": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" + "node_modules/yeoman-generator/node_modules/ignore-walk": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.3.tgz", + "integrity": "sha512-C7FfFoTA+bI10qfeydT8aZbvr91vAEU+2W5BZUlzPec47oNb07SsOfwYrtxuvOYdUApPP/Qlh4DtAO51Ekk2QA==", + "dependencies": { + "minimatch": "^9.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/helper-member-expression-to-functions": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", - "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", - "dev": true, - "requires": { - "@babel/types": "^7.13.12" + "node_modules/yeoman-generator/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "engines": { + "node": ">=12" } }, - "@babel/helper-module-imports": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", - "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", - "dev": true, - "requires": { - "@babel/types": "^7.13.12" + "node_modules/yeoman-generator/node_modules/make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "@babel/helper-module-transforms": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.0.tgz", - "integrity": "sha512-L40t9bxIuGOfpIGA3HNkJhU9qYrf4y5A5LUSw7rGMSn+pcG8dfJ0g6Zval6YJGd2nEjI7oP00fRdnhLKndx6bw==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.13.12", - "@babel/helper-replace-supers": "^7.13.12", - "@babel/helper-simple-access": "^7.13.12", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.14.0", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.14.0", - "@babel/types": "^7.14.0" + "node_modules/yeoman-generator/node_modules/make-fetch-happen/node_modules/@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "@babel/helper-optimise-call-expression": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", - "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" + "node_modules/yeoman-generator/node_modules/make-fetch-happen/node_modules/cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "@babel/helper-plugin-utils": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", - "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", - "dev": true + "node_modules/yeoman-generator/node_modules/make-fetch-happen/node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } }, - "@babel/helper-replace-supers": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", - "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.13.12", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.12" + "node_modules/yeoman-generator/node_modules/make-fetch-happen/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "@babel/helper-simple-access": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", - "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", - "dev": true, - "requires": { - "@babel/types": "^7.13.12" + "node_modules/yeoman-generator/node_modules/make-fetch-happen/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" } }, - "@babel/helper-split-export-declaration": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", - "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", - "dev": true, - "requires": { - "@babel/types": "^7.12.13" + "node_modules/yeoman-generator/node_modules/make-fetch-happen/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "@babel/helper-validator-identifier": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", - "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==" + "node_modules/yeoman-generator/node_modules/make-fetch-happen/node_modules/ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } }, - "@babel/helper-validator-option": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", - "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", - "dev": true + "node_modules/yeoman-generator/node_modules/make-fetch-happen/node_modules/unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } }, - "@babel/helpers": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz", - "integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==", - "dev": true, - "requires": { - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.14.0", - "@babel/types": "^7.14.0" + "node_modules/yeoman-generator/node_modules/make-fetch-happen/node_modules/unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "@babel/highlight": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", - "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", - "requires": { - "@babel/helper-validator-identifier": "^7.14.0", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, + "node_modules/yeoman-generator/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "requires": { - "has-flag": "^3.0.0" - } - } + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "@babel/parser": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.1.tgz", - "integrity": "sha512-muUGEKu8E/ftMTPlNp+mc6zL3E9zKWmF5sDHZ5MSsoTP9Wyz64AhEf9kD08xYJ7w6Hdcu8H550ircnPyWSIF0Q==", - "dev": true - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "node_modules/yeoman-generator/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" } }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "node_modules/yeoman-generator/node_modules/minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "dependencies": { + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" } }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" + "node_modules/yeoman-generator/node_modules/minipass-fetch/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "node_modules/yeoman-generator/node_modules/node-gyp": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.4.1.tgz", + "integrity": "sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ==", + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.13 || ^14.13 || >=16" } }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "node_modules/yeoman-generator/node_modules/node-gyp/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "node_modules/yeoman-generator/node_modules/nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "dependencies": { + "abbrev": "^1.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "node_modules/yeoman-generator/node_modules/npm-bundled": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", + "dependencies": { + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "node_modules/yeoman-generator/node_modules/npm-install-checks": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", + "integrity": "sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==", + "dependencies": { + "semver": "^7.1.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "node_modules/yeoman-generator/node_modules/npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "node_modules/yeoman-generator/node_modules/npm-package-arg": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", + "dependencies": { + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "node_modules/yeoman-generator/node_modules/npm-packlist": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", + "dependencies": { + "ignore-walk": "^6.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", - "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" + "node_modules/yeoman-generator/node_modules/npm-pick-manifest": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.2.tgz", + "integrity": "sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg==", + "dependencies": { + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/runtime": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.3.tgz", - "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==", - "dev": true, - "peer": true, - "requires": { - "regenerator-runtime": "^0.13.4" + "node_modules/yeoman-generator/node_modules/npm-registry-fetch": { + "version": "14.0.5", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz", + "integrity": "sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA==", + "dependencies": { + "make-fetch-happen": "^11.0.0", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/runtime-corejs3": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.3.tgz", - "integrity": "sha512-l4ddFwrc9rnR+EJsHsh+TJ4A35YqQz/UqcjtlX2ov53hlJYG5CxtQmNZxyajwDVmCxwy++rtvGU5HazCK4W41Q==", - "dev": true, - "peer": true, - "requires": { - "core-js-pure": "^3.20.2", - "regenerator-runtime": "^0.13.4" + "node_modules/yeoman-generator/node_modules/npm-registry-fetch/node_modules/make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@babel/template": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", - "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.12.13", - "@babel/types": "^7.12.13" + "node_modules/yeoman-generator/node_modules/npm-registry-fetch/node_modules/minipass-fetch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/yeoman-generator/node_modules/npm-registry-fetch/node_modules/minipass-fetch/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/yeoman-generator/node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.12.13" - } - } + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "@babel/traverse": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.0.tgz", - "integrity": "sha512-dZ/a371EE5XNhTHomvtuLTUyx6UEoJmYX+DT5zBCQN3McHemsuIaKKYqsc/fs26BEkHs/lBZy0J571LP5z9kQA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.14.0", - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.14.0", - "@babel/types": "^7.14.0", - "debug": "^4.1.0", - "globals": "^11.1.0" + "node_modules/yeoman-generator/node_modules/pacote": { + "version": "15.2.0", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.2.0.tgz", + "integrity": "sha512-rJVZeIwHTUta23sIZgEIM62WYwbmGbThdbnkt81ravBplQv+HjyroqnLRNH2+sLJHcGZmLRmhPwACqhfTcOmnA==", + "dependencies": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^5.0.0", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "sigstore": "^1.3.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + }, + "bin": { + "pacote": "lib/bin.js" }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/yeoman-generator/node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.12.13" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "@babel/types": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz", - "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.14.0", - "to-fast-properties": "^2.0.0" + "node_modules/yeoman-generator/node_modules/proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true + "node_modules/yeoman-generator/node_modules/read-package-json-fast": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", + "dependencies": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, - "@cnakazawa/watch": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", - "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", - "dev": true, - "requires": { - "exec-sh": "^0.3.2", - "minimist": "^1.2.0" + "node_modules/yeoman-generator/node_modules/read-package-json-fast/node_modules/json-parse-even-better-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@eslint/eslintrc": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.1.tgz", - "integrity": "sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" + "node_modules/yeoman-generator/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yeoman-generator/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "dev": true, - "requires": { - "type-fest": "^0.8.1" - } + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yeoman-generator/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/yeoman-generator/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/yeoman-generator/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } + { + "type": "patreon", + "url": "https://www.patreon.com/feross" }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true + { + "type": "consulting", + "url": "https://feross.org/support" } + ] + }, + "node_modules/yeoman-generator/node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" } }, - "@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "devOptional": true, - "peer": true + "node_modules/yeoman-generator/node_modules/ssri": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } }, - "@isaacs/string-locale-compare": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz", - "integrity": "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==", - "devOptional": true, - "peer": true + "node_modules/yeoman-generator/node_modules/ssri/node_modules/minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "engines": { + "node": ">=16 || 14 >=14.17" + } }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, + "node_modules/yeoman-generator/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } + "safe-buffer": "~5.2.0" } }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jest/console": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.2.tgz", - "integrity": "sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^26.6.2", - "jest-util": "^26.6.2", - "slash": "^3.0.0" + "node_modules/yeoman-generator/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "engines": { + "node": ">=8" } }, - "@jest/core": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", - "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", - "dev": true, - "requires": { - "@jest/console": "^26.6.2", - "@jest/reporters": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.6.2", - "jest-config": "^26.6.3", - "jest-haste-map": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.6.2", - "jest-resolve-dependencies": "^26.6.3", - "jest-runner": "^26.6.3", - "jest-runtime": "^26.6.3", - "jest-snapshot": "^26.6.2", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "jest-watcher": "^26.6.2", - "micromatch": "^4.0.2", - "p-each-series": "^2.1.0", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" + "node_modules/yeoman-generator/node_modules/unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "dependencies": { + "unique-slug": "^4.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@jest/environment": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", - "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==", - "dev": true, - "requires": { - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "jest-mock": "^26.6.2" + "node_modules/yeoman-generator/node_modules/unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@jest/fake-timers": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", - "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@sinonjs/fake-timers": "^6.0.1", - "@types/node": "*", - "jest-message-util": "^26.6.2", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2" + "node_modules/yeoman-generator/node_modules/validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "dependencies": { + "builtins": "^5.0.0" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@jest/globals": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.2.tgz", - "integrity": "sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==", - "dev": true, - "requires": { - "@jest/environment": "^26.6.2", - "@jest/types": "^26.6.2", - "expect": "^26.6.2" + "node_modules/yeoman-generator/node_modules/which": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", + "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/which.js" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "@jest/reporters": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz", - "integrity": "sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==", + "node_modules/yeoman-test": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/yeoman-test/-/yeoman-test-5.1.0.tgz", + "integrity": "sha512-lcXcNRleJrIhohoKcRwmj9i8JO0lsYTySprwCfgZV1THeHJRqUsBEhHVgMr7DVB+coMoIkxk99wpn/bsOvpz4w==", "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.4", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.3", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.6.2", - "jest-resolve": "^26.6.2", - "jest-util": "^26.6.2", - "jest-worker": "^26.6.2", - "node-notifier": "^8.0.0", - "slash": "^3.0.0", - "source-map": "^0.6.0", - "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^7.0.0" + "dependencies": { + "inquirer": "^7.3.3", + "lodash": "^4.17.19", + "mem-fs-editor": "^8.0.0", + "sinon": "^9.0.2" + }, + "engines": { + "node": ">=12.10.0" + }, + "peerDependencies": { + "yeoman-environment": "^3.0.0 || ^2.10.3", + "yeoman-generator": "*" } }, - "@jest/source-map": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", - "integrity": "sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==", + "node_modules/yeoman-test/node_modules/mem-fs-editor": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-8.1.2.tgz", + "integrity": "sha512-owE6PKMRegrYb37Lsar3yLSwK9wLGvHkNIOzBO3ycFeoOwshdF8j593EqjU7ucFAf3ZvcFVwfpo8Q8LqgFQg0A==", "dev": true, - "requires": { - "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", - "source-map": "^0.6.0" + "dependencies": { + "commondir": "^1.0.1", + "deep-extend": "^0.6.0", + "ejs": "^3.1.6", + "globby": "^11.0.2", + "isbinaryfile": "^4.0.0", + "multimatch": "^5.0.0", + "normalize-path": "^3.0.0" + }, + "engines": { + "node": ">=12.10.0" + }, + "peerDependencies": { + "mem-fs": "^1.2.0 || ^2.0.0" + }, + "peerDependenciesMeta": { + "mem-fs": { + "optional": true + } } }, - "@jest/test-result": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.2.tgz", - "integrity": "sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==", + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, - "requires": { - "@jest/console": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "engines": { + "node": ">=6" } }, - "@jest/test-sequencer": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz", - "integrity": "sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==", - "dev": true, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "devOptional": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "requires": { - "@jest/test-result": "^26.6.2", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.6.2", - "jest-runner": "^26.6.3", - "jest-runtime": "^26.6.3" + "@babel/highlight": "^7.10.4" } }, - "@jest/transform": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.2.tgz", - "integrity": "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==", + "@babel/compat-data": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz", + "integrity": "sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q==", + "dev": true + }, + "@babel/core": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.0.tgz", + "integrity": "sha512-8YqpRig5NmIHlMLw09zMlPTvUVMILjqCOtVgu+TVNWEBvy9b5I3RRyhqnrV4hjgEK7n8P9OqvkWJAFmEL6Wwfw==", "dev": true, "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^26.6.2", - "babel-plugin-istanbul": "^6.0.0", - "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-util": "^26.6.2", - "micromatch": "^4.0.2", - "pirates": "^4.0.1", - "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.14.0", + "@babel/helper-compilation-targets": "^7.13.16", + "@babel/helper-module-transforms": "^7.14.0", + "@babel/helpers": "^7.14.0", + "@babel/parser": "^7.14.0", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, - "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "@babel/generator": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz", + "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==", "dev": true, "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0" + "@babel/types": "^7.14.1", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } } }, - "@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "@babel/helper-compilation-targets": { + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", + "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", "dev": true, - "peer": true, "requires": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@babel/compat-data": "^7.13.15", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, - "@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", "dev": true, - "peer": true + "requires": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } }, - "@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", "dev": true, - "peer": true + "requires": { + "@babel/types": "^7.12.13" + } }, - "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "@babel/helper-member-expression-to-functions": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", "dev": true, - "peer": true, "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@babel/types": "^7.13.12" } }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "@babel/helper-module-imports": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", "dev": true, - "peer": true + "requires": { + "@babel/types": "^7.13.12" + } }, - "@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "@babel/helper-module-transforms": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.0.tgz", + "integrity": "sha512-L40t9bxIuGOfpIGA3HNkJhU9qYrf4y5A5LUSw7rGMSn+pcG8dfJ0g6Zval6YJGd2nEjI7oP00fRdnhLKndx6bw==", "dev": true, - "peer": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.14.0", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "devOptional": true, + "@babel/helper-optimise-call-expression": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "dev": true, "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "@babel/types": "^7.12.13" } }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "devOptional": true + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", + "dev": true }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "devOptional": true, + "@babel/helper-replace-supers": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "dev": true, "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "@babel/helper-member-expression-to-functions": "^7.13.12", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" } }, - "@npmcli/arborist": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-4.3.1.tgz", - "integrity": "sha512-yMRgZVDpwWjplorzt9SFSaakWx6QIK248Nw4ZFgkrAy/GvJaFRaSZzE6nD7JBK5r8g/+PTxFq5Wj/sfciE7x+A==", - "devOptional": true, - "peer": true, + "@babel/helper-simple-access": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", + "dev": true, "requires": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/map-workspaces": "^2.0.0", - "@npmcli/metavuln-calculator": "^2.0.0", - "@npmcli/move-file": "^1.1.0", - "@npmcli/name-from-folder": "^1.0.1", - "@npmcli/node-gyp": "^1.0.3", - "@npmcli/package-json": "^1.0.1", - "@npmcli/run-script": "^2.0.0", - "bin-links": "^3.0.0", - "cacache": "^15.0.3", - "common-ancestor-path": "^1.0.1", - "json-parse-even-better-errors": "^2.3.1", - "json-stringify-nice": "^1.1.4", - "mkdirp": "^1.0.4", - "mkdirp-infer-owner": "^2.0.0", - "npm-install-checks": "^4.0.0", - "npm-package-arg": "^8.1.5", - "npm-pick-manifest": "^6.1.0", - "npm-registry-fetch": "^12.0.1", - "pacote": "^12.0.2", - "parse-conflict-json": "^2.0.1", - "proc-log": "^1.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^1.0.1", - "read-package-json-fast": "^2.0.2", - "readdir-scoped-modules": "^1.1.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "ssri": "^8.0.1", - "treeverse": "^1.0.4", - "walk-up-path": "^1.0.0" + "@babel/types": "^7.13.12" } }, - "@npmcli/fs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", - "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", - "devOptional": true, - "peer": true, + "@babel/helper-split-export-declaration": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "dev": true, "requires": { - "@gar/promisify": "^1.0.1", - "semver": "^7.3.5" + "@babel/types": "^7.12.13" } }, - "@npmcli/git": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.1.0.tgz", - "integrity": "sha512-/hBFX/QG1b+N7PZBFs0bi+evgRZcK9nWBxQKZkGoXUT5hJSwl5c4d7y8/hm+NQZRPhQ67RzFaj5UM9YeyKoryw==", - "devOptional": true, - "peer": true, - "requires": { - "@npmcli/promise-spawn": "^1.3.2", - "lru-cache": "^6.0.0", - "mkdirp": "^1.0.4", - "npm-pick-manifest": "^6.1.1", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^2.0.2" - } + "@babel/helper-validator-identifier": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==" }, - "@npmcli/installed-package-contents": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", - "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", - "devOptional": true, - "peer": true, + "@babel/helper-validator-option": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", + "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz", + "integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==", + "dev": true, "requires": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, - "@npmcli/map-workspaces": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-2.0.4.tgz", - "integrity": "sha512-bMo0aAfwhVwqoVM5UzX1DJnlvVvzDCHae821jv48L1EsrYwfOZChlqWYXEtto/+BkBXetPbEWgau++/brh4oVg==", - "devOptional": true, - "peer": true, + "@babel/highlight": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", + "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", "requires": { - "@npmcli/name-from-folder": "^1.0.1", - "glob": "^8.0.1", - "minimatch": "^5.0.1", - "read-package-json-fast": "^2.0.3" + "@babel/helper-validator-identifier": "^7.14.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" }, "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "devOptional": true, - "peer": true, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "requires": { - "balanced-match": "^1.0.0" + "color-convert": "^1.9.0" } }, - "glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", - "devOptional": true, - "peer": true, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" } }, - "minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", - "devOptional": true, - "peer": true, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "requires": { - "brace-expansion": "^2.0.1" + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" } } } }, - "@npmcli/metavuln-calculator": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-2.0.0.tgz", - "integrity": "sha512-VVW+JhWCKRwCTE+0xvD6p3uV4WpqocNYYtzyvenqL/u1Q3Xx6fGTJ+6UoIoii07fbuEO9U3IIyuGY0CYHDv1sg==", - "devOptional": true, - "peer": true, + "@babel/parser": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.1.tgz", + "integrity": "sha512-muUGEKu8E/ftMTPlNp+mc6zL3E9zKWmF5sDHZ5MSsoTP9Wyz64AhEf9kD08xYJ7w6Hdcu8H550ircnPyWSIF0Q==", + "dev": true + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, "requires": { - "cacache": "^15.0.5", - "json-parse-even-better-errors": "^2.3.1", - "pacote": "^12.0.0", - "semver": "^7.3.2" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", - "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", - "devOptional": true, - "peer": true, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@npmcli/name-from-folder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-1.0.1.tgz", - "integrity": "sha512-qq3oEfcLFwNfEYOQ8HLimRGKlD8WSeGEdtUa7hmzpR8Sa7haL1KVQrvgO6wqMjhWFFVjgtrh1gIxDz+P8sjUaA==", - "devOptional": true, - "peer": true - }, - "@npmcli/node-gyp": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", - "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", - "devOptional": true, - "peer": true - }, - "@npmcli/package-json": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-1.0.1.tgz", - "integrity": "sha512-y6jnu76E9C23osz8gEMBayZmaZ69vFOIk8vR1FJL/wbEJ54+9aVG9rLTjQKSXfgYZEr50nw1txBBFfBZZe+bYg==", - "devOptional": true, - "peer": true, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, "requires": { - "json-parse-even-better-errors": "^2.3.1" + "@babel/helper-plugin-utils": "^7.12.13" } }, - "@npmcli/promise-spawn": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", - "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", - "devOptional": true, - "peer": true, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, "requires": { - "infer-owner": "^1.0.4" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@npmcli/run-script": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-2.0.0.tgz", - "integrity": "sha512-fSan/Pu11xS/TdaTpTB0MRn9guwGU8dye+x56mEVgBEd/QsybBbYcAL0phPXi8SGWFEChkQd6M9qL4y6VOpFig==", - "devOptional": true, - "peer": true, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, "requires": { - "@npmcli/node-gyp": "^1.0.2", - "@npmcli/promise-spawn": "^1.3.2", - "node-gyp": "^8.2.0", - "read-package-json-fast": "^2.0.1" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@octokit/auth-token": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", - "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, "requires": { - "@octokit/types": "^6.0.3" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@octokit/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", - "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, "requires": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.6.3", - "@octokit/request-error": "^2.0.5", - "@octokit/types": "^6.0.3", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@octokit/endpoint": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", - "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, "requires": { - "@octokit/types": "^6.0.3", - "is-plain-object": "^5.0.0", - "universal-user-agent": "^6.0.0" - }, - "dependencies": { - "is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" - } + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@octokit/graphql": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", - "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, "requires": { - "@octokit/request": "^5.6.0", - "@octokit/types": "^6.0.3", - "universal-user-agent": "^6.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@octokit/openapi-types": { - "version": "12.11.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", - "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" - }, - "@octokit/plugin-paginate-rest": { - "version": "2.21.3", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", - "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, "requires": { - "@octokit/types": "^6.40.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@octokit/plugin-request-log": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", - "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", - "requires": {} - }, - "@octokit/plugin-rest-endpoint-methods": { - "version": "5.16.2", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", - "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, "requires": { - "@octokit/types": "^6.39.0", - "deprecation": "^2.3.1" + "@babel/helper-plugin-utils": "^7.8.0" } }, - "@octokit/request": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", - "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "@babel/plugin-syntax-top-level-await": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", + "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==", + "dev": true, "requires": { - "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.1.0", - "@octokit/types": "^6.16.1", - "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", - "universal-user-agent": "^6.0.0" - }, - "dependencies": { - "is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" - } + "@babel/helper-plugin-utils": "^7.12.13" } }, - "@octokit/request-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", - "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "@babel/runtime": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.3.tgz", + "integrity": "sha512-38Y8f7YUhce/K7RMwTp7m0uCumpv9hZkitCbBClqQIow1qSbCvGkcegKOXpEWCQLfWmevgRiWokZ1GkpfhbZug==", + "dev": true, + "peer": true, "requires": { - "@octokit/types": "^6.0.3", - "deprecation": "^2.0.0", - "once": "^1.4.0" + "regenerator-runtime": "^0.13.4" } }, - "@octokit/rest": { - "version": "18.12.0", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz", - "integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==", + "@babel/runtime-corejs3": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.3.tgz", + "integrity": "sha512-l4ddFwrc9rnR+EJsHsh+TJ4A35YqQz/UqcjtlX2ov53hlJYG5CxtQmNZxyajwDVmCxwy++rtvGU5HazCK4W41Q==", + "dev": true, + "peer": true, "requires": { - "@octokit/core": "^3.5.1", - "@octokit/plugin-paginate-rest": "^2.16.8", - "@octokit/plugin-request-log": "^1.0.4", - "@octokit/plugin-rest-endpoint-methods": "^5.12.0" + "core-js-pure": "^3.20.2", + "regenerator-runtime": "^0.13.4" } }, - "@octokit/types": { - "version": "6.41.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", - "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "@babel/template": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "dev": true, "requires": { - "@octokit/openapi-types": "^12.11.0" + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + } } }, - "@sindresorhus/is": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", - "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==" - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "@babel/traverse": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.0.tgz", + "integrity": "sha512-dZ/a371EE5XNhTHomvtuLTUyx6UEoJmYX+DT5zBCQN3McHemsuIaKKYqsc/fs26BEkHs/lBZy0J571LP5z9kQA==", "dev": true, "requires": { - "type-detect": "4.0.8" + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.14.0", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.14.0", + "@babel/types": "^7.14.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.12.13" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } } }, - "@sinonjs/fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", - "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "@babel/types": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz", + "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0" + "@babel/helper-validator-identifier": "^7.14.0", + "to-fast-properties": "^2.0.0" } }, - "@sinonjs/samsam": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", - "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@cnakazawa/watch": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", + "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", "dev": true, "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" + "exec-sh": "^0.3.2", + "minimist": "^1.2.0" } }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true + "@eslint/eslintrc": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.1.tgz", + "integrity": "sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } }, - "@szmarczak/http-timer": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.5.tgz", - "integrity": "sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ==", + "@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==" + }, + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "requires": { - "defer-to-connect": "^2.0.0" + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==" + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==" + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } + } } }, - "@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "devOptional": true + "@isaacs/string-locale-compare": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz", + "integrity": "sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==", + "devOptional": true, + "peer": true }, - "@types/babel__core": { - "version": "7.1.14", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz", - "integrity": "sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g==", + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } } }, - "@types/babel__generator": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", - "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.2.tgz", + "integrity": "sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.2", + "jest-util": "^26.6.2", + "slash": "^3.0.0" } }, - "@types/babel__template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", - "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", + "@jest/core": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", + "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", "dev": true, "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" + "@jest/console": "^26.6.2", + "@jest/reporters": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-changed-files": "^26.6.2", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-resolve-dependencies": "^26.6.3", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "jest-watcher": "^26.6.2", + "micromatch": "^4.0.2", + "p-each-series": "^2.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" } }, - "@types/babel__traverse": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.1.tgz", - "integrity": "sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==", + "@jest/environment": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", + "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==", "dev": true, "requires": { - "@babel/types": "^7.3.0" + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2" } }, - "@types/cacheable-request": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.1.tgz", - "integrity": "sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ==", + "@jest/fake-timers": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", + "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==", + "dev": true, "requires": { - "@types/http-cache-semantics": "*", - "@types/keyv": "*", + "@jest/types": "^26.6.2", + "@sinonjs/fake-timers": "^6.0.1", "@types/node": "*", - "@types/responselike": "*" + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" } }, - "@types/debug": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz", - "integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==", - "dev": true - }, - "@types/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-jrm2K65CokCCX4NmowtA+MfXyuprZC13jbRuwprs6/04z/EcFg/MCwYdsHn+zgV4CQBiATiI7AEq7y1sZCtWKA==", - "dev": true + "@jest/globals": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.2.tgz", + "integrity": "sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/types": "^26.6.2", + "expect": "^26.6.2" + } }, - "@types/ejs": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@types/ejs/-/ejs-3.0.6.tgz", - "integrity": "sha512-fj1hi+ZSW0xPLrJJD+YNwIh9GZbyaIepG26E/gXvp8nCa2pYokxUYO1sK9qjGxp2g8ryZYuon7wmjpwE2cyASQ==", - "dev": true - }, - "@types/eslint": { - "version": "8.4.3", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.3.tgz", - "integrity": "sha512-YP1S7YJRMPs+7KZKDb9G63n8YejIwW9BALq7a5j2+H4yl6iOv9CB29edho+cuFRrvmJbbaH2yiVChKLJVysDGw==", + "@jest/reporters": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz", + "integrity": "sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==", "dev": true, - "peer": true, "requires": { - "@types/estree": "*", - "@types/json-schema": "*" + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.4", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "jest-haste-map": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "node-notifier": "^8.0.0", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^7.0.0" } }, - "@types/eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", + "@jest/source-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", + "integrity": "sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==", "dev": true, - "peer": true, "requires": { - "@types/eslint": "*", - "@types/estree": "*" + "callsites": "^3.0.0", + "graceful-fs": "^4.2.4", + "source-map": "^0.6.0" } }, - "@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", - "dev": true, - "peer": true - }, - "@types/expect": { - "version": "1.20.4", - "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", - "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==", - "devOptional": true - }, - "@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", + "@jest/test-result": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.2.tgz", + "integrity": "sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==", "dev": true, "requires": { - "@types/minimatch": "*", - "@types/node": "*" + "@jest/console": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" } }, - "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "@jest/test-sequencer": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz", + "integrity": "sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==", "dev": true, "requires": { - "@types/node": "*" + "@jest/test-result": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3" } }, - "@types/http-cache-semantics": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz", - "integrity": "sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==" - }, - "@types/inquirer": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-7.3.1.tgz", - "integrity": "sha512-osD38QVIfcdgsPCT0V3lD7eH0OFurX71Jft18bZrsVQWVRt6TuxRzlr0GJLrxoHZR2V5ph7/qP8se/dcnI7o0g==", + "@jest/transform": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.2.tgz", + "integrity": "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==", "dev": true, "requires": { - "@types/through": "*", - "rxjs": "^6.4.0" + "@babel/core": "^7.1.0", + "@jest/types": "^26.6.2", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.6.2", + "micromatch": "^4.0.2", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" } }, - "@types/istanbul-lib-coverage": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", - "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", - "dev": true - }, - "@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", "dev": true, "requires": { - "@types/istanbul-lib-coverage": "*" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" } }, - "@types/istanbul-reports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz", - "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==", + "@jridgewell/gen-mapping": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", + "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", "dev": true, + "peer": true, "requires": { - "@types/istanbul-lib-report": "*" + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" } }, - "@types/jest": { - "version": "27.0.1", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.1.tgz", - "integrity": "sha512-HTLpVXHrY69556ozYkcq47TtQJXpcWAWfkoqz+ZGz2JnmZhzlRjprCIyFnetSy8gpDWwTTGBcRVv1J1I1vBrHw==", + "@jridgewell/resolve-uri": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", + "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", "dev": true, - "requires": { - "jest-diff": "^27.0.0", - "pretty-format": "^27.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "27.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.1.0.tgz", - "integrity": "sha512-pRP5cLIzN7I7Vp6mHKRSaZD7YpBTK7hawx5si8trMKqk4+WOdK8NEKOTO2G8PKWD1HbKMVckVB6/XHh/olhf2g==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^16.0.0", - "chalk": "^4.0.0" - } - }, - "@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - }, - "diff-sequences": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.0.6.tgz", - "integrity": "sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==", - "dev": true - }, - "jest-diff": { - "version": "27.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.1.0.tgz", - "integrity": "sha512-rjfopEYl58g/SZTsQFmspBODvMSytL16I+cirnScWTLkQVXYVZfxm78DFfdIIXc05RCYuGjxJqrdyG4PIFzcJg==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^27.0.6", - "jest-get-type": "^27.0.6", - "pretty-format": "^27.1.0" - } - }, - "jest-get-type": { - "version": "27.0.6", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.0.6.tgz", - "integrity": "sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg==", - "dev": true - }, - "pretty-format": { - "version": "27.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.1.0.tgz", - "integrity": "sha512-4aGaud3w3rxAO6OXmK3fwBFQ0bctIOG3/if+jYEFGNGIs0EvuidQm3bZ9mlP2/t9epLNC/12czabfy7TZNSwVA==", - "dev": true, - "requires": { - "@jest/types": "^27.1.0", - "ansi-regex": "^5.0.0", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" - } - } - } + "peer": true }, - "@types/jest-json-schema": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@types/jest-json-schema/-/jest-json-schema-2.1.3.tgz", - "integrity": "sha512-WWL2gD1UyhYHFjIoSg9WEEI6hQKBG1C5CRIntU3jHXqiGcY6TW5lweDh6aY+IkskxWfpq/NAu9HzAbPEanX9rg==", + "@jridgewell/set-array": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", + "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "dev": true, + "peer": true + }, + "@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", "dev": true, + "peer": true, "requires": { - "@types/jest": "*", - "ajv": "^6.10.2" + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" } }, - "@types/js-yaml": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.1.tgz", - "integrity": "sha512-xdOvNmXmrZqqPy3kuCQ+fz6wA0xU5pji9cd1nDrflWaAWtYLLGk5ykW0H6yg5TVyehHP1pfmuuSaZkhP+kspVA==", - "dev": true - }, - "@types/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ==" - }, - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", - "dev": true - }, - "@types/keyv": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.1.tgz", - "integrity": "sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==", - "requires": { - "@types/node": "*" - } - }, - "@types/lodash": { - "version": "4.14.168", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz", - "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==", - "dev": true - }, - "@types/mem-fs": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@types/mem-fs/-/mem-fs-1.1.2.tgz", - "integrity": "sha512-tt+4IoDO8/wmtaP2bHnB91c8AnzYtR9MK6NxfcZY9E3XgtmzOiFMeSXu3EZrBeevd0nJ87iGoUiFDGsb9QUvew==", - "dev": true, - "requires": { - "@types/node": "*", - "@types/vinyl": "*" - } - }, - "@types/mem-fs-editor": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@types/mem-fs-editor/-/mem-fs-editor-7.0.0.tgz", - "integrity": "sha512-fTwoRtwv7YYLnzZmkOOzlrCZBJQssUcBCHxy7y52iUyxkqVxXCDOSis9yQbanOMYHnijIEtkIhep8YTMeAuVDw==", + "@jridgewell/sourcemap-codec": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", + "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", "dev": true, - "requires": { - "@types/ejs": "*", - "@types/glob": "*", - "@types/json-schema": "*", - "@types/mem-fs": "*", - "@types/node": "*", - "@types/vinyl": "*" - } - }, - "@types/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==", - "devOptional": true - }, - "@types/node": { - "version": "15.14.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.7.tgz", - "integrity": "sha512-FA45p37/mLhpebgbPWWCKfOisTjxGK9lwcHlJ6XVLfu3NgfcazOJHdYUZCWPMK8QX4LhNZdmfo6iMz9FqpUbaw==" + "peer": true }, - "@types/node-fetch": { - "version": "2.5.10", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.10.tgz", - "integrity": "sha512-IpkX0AasN44hgEad0gEF/V6EgR5n69VEqPEgnmoM8GsIGro3PowbWs4tR6IhxUTyPLpOn+fiGG6nrQhcmoCuIQ==", + "@jridgewell/trace-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", + "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", "dev": true, + "peer": true, "requires": { - "@types/node": "*", - "form-data": "^3.0.0" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==" - }, - "@types/prettier": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.2.3.tgz", - "integrity": "sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA==", - "dev": true - }, - "@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "requires": { - "@types/node": "*" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" } }, - "@types/stack-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", - "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", - "dev": true - }, - "@types/text-table": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@types/text-table/-/text-table-0.2.1.tgz", - "integrity": "sha512-dchbFCWfVgUSWEvhOkXGS7zjm+K7jCUvGrQkAHPk2Fmslfofp4HQTH2pqnQ3Pw5GPYv0zWa2AQjKtsfZThuemQ==", - "dev": true + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" }, - "@types/through": { - "version": "0.0.30", - "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.30.tgz", - "integrity": "sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==", - "dev": true, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "requires": { - "@types/node": "*" + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" } }, - "@types/vinyl": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.4.tgz", - "integrity": "sha512-2o6a2ixaVI2EbwBPg1QYLGQoHK56p/8X/sGfKbFC8N6sY9lfjsMf/GprtkQkSya0D4uRiutRZ2BWj7k3JvLsAQ==", + "@npmcli/arborist": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-4.3.1.tgz", + "integrity": "sha512-yMRgZVDpwWjplorzt9SFSaakWx6QIK248Nw4ZFgkrAy/GvJaFRaSZzE6nD7JBK5r8g/+PTxFq5Wj/sfciE7x+A==", "devOptional": true, + "peer": true, "requires": { - "@types/expect": "^1.20.4", - "@types/node": "*" + "@isaacs/string-locale-compare": "^1.1.0", + "@npmcli/installed-package-contents": "^1.0.7", + "@npmcli/map-workspaces": "^2.0.0", + "@npmcli/metavuln-calculator": "^2.0.0", + "@npmcli/move-file": "^1.1.0", + "@npmcli/name-from-folder": "^1.0.1", + "@npmcli/node-gyp": "^1.0.3", + "@npmcli/package-json": "^1.0.1", + "@npmcli/run-script": "^2.0.0", + "bin-links": "^3.0.0", + "cacache": "^15.0.3", + "common-ancestor-path": "^1.0.1", + "json-parse-even-better-errors": "^2.3.1", + "json-stringify-nice": "^1.1.4", + "mkdirp": "^1.0.4", + "mkdirp-infer-owner": "^2.0.0", + "npm-install-checks": "^4.0.0", + "npm-package-arg": "^8.1.5", + "npm-pick-manifest": "^6.1.0", + "npm-registry-fetch": "^12.0.1", + "pacote": "^12.0.2", + "parse-conflict-json": "^2.0.1", + "proc-log": "^1.0.0", + "promise-all-reject-late": "^1.0.0", + "promise-call-limit": "^1.0.1", + "read-package-json-fast": "^2.0.2", + "readdir-scoped-modules": "^1.1.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "ssri": "^8.0.1", + "treeverse": "^1.0.4", + "walk-up-path": "^1.0.0" } }, - "@types/yargs": { - "version": "15.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz", - "integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==", - "dev": true, + "@npmcli/fs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", + "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", + "devOptional": true, + "peer": true, "requires": { - "@types/yargs-parser": "*" + "@gar/promisify": "^1.0.1", + "semver": "^7.3.5" } }, - "@types/yargs-parser": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz", - "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", - "dev": true - }, - "@types/yeoman-environment": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/@types/yeoman-environment/-/yeoman-environment-2.10.3.tgz", - "integrity": "sha512-1QQaJcXXFz5U/r83M6XShIr6GN3ps1mf/w4cDBrAmIP9ip+CPU+JklriPT6IMi2wb0oGzifx3iwjqXpHF63BlA==", - "dev": true, + "@npmcli/git": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-2.1.0.tgz", + "integrity": "sha512-/hBFX/QG1b+N7PZBFs0bi+evgRZcK9nWBxQKZkGoXUT5hJSwl5c4d7y8/hm+NQZRPhQ67RzFaj5UM9YeyKoryw==", + "devOptional": true, + "peer": true, "requires": { - "@types/diff": "*", - "@types/inquirer": "*", - "@types/mem-fs": "*", - "@types/text-table": "*", - "@types/yeoman-generator": "*", - "chalk": "^4.1.0", - "rxjs": "^6.4.0" + "@npmcli/promise-spawn": "^1.3.2", + "lru-cache": "^6.0.0", + "mkdirp": "^1.0.4", + "npm-pick-manifest": "^6.1.1", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^2.0.2" } }, - "@types/yeoman-generator": { - "version": "4.11.4", - "resolved": "https://registry.npmjs.org/@types/yeoman-generator/-/yeoman-generator-4.11.4.tgz", - "integrity": "sha512-JB0rxFS8oskkKLALii9y3Tb6DQaLQ/bxBU6nUIAh9e/47T1PvVODfMlj1Hkxrw/rzNhgGOzkG/xiOHL5EsqCag==", - "dev": true, + "@npmcli/installed-package-contents": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", + "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", + "devOptional": true, + "peer": true, "requires": { - "@types/debug": "*", - "@types/ejs": "*", - "@types/inquirer": "*", - "@types/mem-fs-editor": "*", - "@types/yeoman-environment": "*", - "rxjs": "^6.4.0" + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" } }, - "@typescript-eslint/eslint-plugin": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.1.tgz", - "integrity": "sha512-kVTAghWDDhsvQ602tHBc6WmQkdaYbkcTwZu+7l24jtJiYvm9l+/y/b2BZANEezxPDiX5MK2ZecE+9BFi/YJryw==", - "dev": true, + "@npmcli/map-workspaces": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-2.0.4.tgz", + "integrity": "sha512-bMo0aAfwhVwqoVM5UzX1DJnlvVvzDCHae821jv48L1EsrYwfOZChlqWYXEtto/+BkBXetPbEWgau++/brh4oVg==", + "devOptional": true, + "peer": true, "requires": { - "@typescript-eslint/experimental-utils": "4.22.1", - "@typescript-eslint/scope-manager": "4.22.1", - "debug": "^4.1.1", - "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.15", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "@npmcli/name-from-folder": "^1.0.1", + "glob": "^8.0.1", + "minimatch": "^5.0.1", + "read-package-json-fast": "^2.0.3" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "devOptional": true, + "peer": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "devOptional": true, + "peer": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", + "devOptional": true, + "peer": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, - "@typescript-eslint/experimental-utils": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.1.tgz", - "integrity": "sha512-svYlHecSMCQGDO2qN1v477ax/IDQwWhc7PRBiwAdAMJE7GXk5stF4Z9R/8wbRkuX/5e9dHqbIWxjeOjckK3wLQ==", - "dev": true, + "@npmcli/metavuln-calculator": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-2.0.0.tgz", + "integrity": "sha512-VVW+JhWCKRwCTE+0xvD6p3uV4WpqocNYYtzyvenqL/u1Q3Xx6fGTJ+6UoIoii07fbuEO9U3IIyuGY0CYHDv1sg==", + "devOptional": true, + "peer": true, "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.22.1", - "@typescript-eslint/types": "4.22.1", - "@typescript-eslint/typescript-estree": "4.22.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "cacache": "^15.0.5", + "json-parse-even-better-errors": "^2.3.1", + "pacote": "^12.0.0", + "semver": "^7.3.2" } }, - "@typescript-eslint/parser": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.1.tgz", - "integrity": "sha512-l+sUJFInWhuMxA6rtirzjooh8cM/AATAe3amvIkqKFeMzkn85V+eLzb1RyuXkHak4dLfYzOmF6DXPyflJvjQnw==", - "dev": true, + "@npmcli/move-file": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", + "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "devOptional": true, + "peer": true, "requires": { - "@typescript-eslint/scope-manager": "4.22.1", - "@typescript-eslint/types": "4.22.1", - "@typescript-eslint/typescript-estree": "4.22.1", - "debug": "^4.1.1" + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" } }, - "@typescript-eslint/scope-manager": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.1.tgz", - "integrity": "sha512-d5bAiPBiessSmNi8Amq/RuLslvcumxLmyhf1/Xa9IuaoFJ0YtshlJKxhlbY7l2JdEk3wS0EnmnfeJWSvADOe0g==", - "dev": true, - "requires": { - "@typescript-eslint/types": "4.22.1", - "@typescript-eslint/visitor-keys": "4.22.1" - } + "@npmcli/name-from-folder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-1.0.1.tgz", + "integrity": "sha512-qq3oEfcLFwNfEYOQ8HLimRGKlD8WSeGEdtUa7hmzpR8Sa7haL1KVQrvgO6wqMjhWFFVjgtrh1gIxDz+P8sjUaA==", + "devOptional": true, + "peer": true }, - "@typescript-eslint/types": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.1.tgz", - "integrity": "sha512-2HTkbkdAeI3OOcWbqA8hWf/7z9c6gkmnWNGz0dKSLYLWywUlkOAQ2XcjhlKLj5xBFDf8FgAOF5aQbnLRvgNbCw==", - "dev": true + "@npmcli/node-gyp": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-1.0.3.tgz", + "integrity": "sha512-fnkhw+fmX65kiLqk6E3BFLXNC26rUhK90zVwe2yncPliVT/Qos3xjhTLE59Df8KnPlcwIERXKVlU1bXoUQ+liA==", + "devOptional": true, + "peer": true }, - "@typescript-eslint/typescript-estree": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.1.tgz", - "integrity": "sha512-p3We0pAPacT+onSGM+sPR+M9CblVqdA9F1JEdIqRVlxK5Qth4ochXQgIyb9daBomyQKAXbygxp1aXQRV0GC79A==", - "dev": true, + "@npmcli/package-json": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-1.0.1.tgz", + "integrity": "sha512-y6jnu76E9C23osz8gEMBayZmaZ69vFOIk8vR1FJL/wbEJ54+9aVG9rLTjQKSXfgYZEr50nw1txBBFfBZZe+bYg==", + "devOptional": true, + "peer": true, "requires": { - "@typescript-eslint/types": "4.22.1", - "@typescript-eslint/visitor-keys": "4.22.1", - "debug": "^4.1.1", - "globby": "^11.0.1", - "is-glob": "^4.0.1", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "json-parse-even-better-errors": "^2.3.1" } }, - "@typescript-eslint/visitor-keys": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.1.tgz", - "integrity": "sha512-WPkOrIRm+WCLZxXQHCi+WG8T2MMTUFR70rWjdWYddLT7cEfb2P4a3O/J2U1FBVsSFTocXLCoXWY6MZGejeStvQ==", - "dev": true, + "@npmcli/promise-spawn": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-1.3.2.tgz", + "integrity": "sha512-QyAGYo/Fbj4MXeGdJcFzZ+FkDkomfRBrPM+9QYJSg+PxgAUL+LU3FneQk37rKR2/zjqkCV1BLHccX98wRXG3Sg==", + "devOptional": true, + "peer": true, "requires": { - "@typescript-eslint/types": "4.22.1", - "eslint-visitor-keys": "^2.0.0" + "infer-owner": "^1.0.4" } }, - "@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", - "dev": true, + "@npmcli/run-script": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-2.0.0.tgz", + "integrity": "sha512-fSan/Pu11xS/TdaTpTB0MRn9guwGU8dye+x56mEVgBEd/QsybBbYcAL0phPXi8SGWFEChkQd6M9qL4y6VOpFig==", + "devOptional": true, "peer": true, "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@npmcli/node-gyp": "^1.0.2", + "@npmcli/promise-spawn": "^1.3.2", + "node-gyp": "^8.2.0", + "read-package-json-fast": "^2.0.1" } }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", - "dev": true, - "peer": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", - "dev": true, - "peer": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", - "dev": true, - "peer": true - }, - "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", - "dev": true, - "peer": true, + "@octokit/auth-token": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@xtuc/long": "4.2.2" + "@octokit/types": "^6.0.3" } }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", - "dev": true, - "peer": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", - "dev": true, - "peer": true, + "@octokit/core": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", + "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.3", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" } }, - "@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", - "dev": true, - "peer": true, + "@octokit/endpoint": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", "requires": { - "@xtuc/ieee754": "^1.2.0" + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + } } }, - "@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", - "dev": true, - "peer": true, + "@octokit/graphql": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", "requires": { - "@xtuc/long": "4.2.2" + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" } }, - "@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", - "dev": true, - "peer": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } + "@octokit/openapi-types": { + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" }, - "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", - "dev": true, - "peer": true, + "@octokit/plugin-paginate-rest": { + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@octokit/types": "^6.40.0" } }, - "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", - "dev": true, - "peer": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } + "@octokit/plugin-request-log": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", + "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", + "requires": {} }, - "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", - "dev": true, - "peer": true, + "@octokit/plugin-rest-endpoint-methods": { + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", "requires": { - "@webassemblyjs/ast": "1.11.1", - "@xtuc/long": "4.2.2" + "@octokit/types": "^6.39.0", + "deprecation": "^2.3.1" } }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true, - "peer": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true, - "peer": true - }, - "abab": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", - "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", - "dev": true - }, - "abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "devOptional": true, - "peer": true - }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", - "dev": true, + "@octokit/request": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" + } } }, - "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true, - "requires": {} - }, - "acorn-node": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", - "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", - "dev": true, + "@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", "requires": { - "acorn": "^7.0.0", - "acorn-walk": "^7.0.0", - "xtend": "^4.0.2" + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" } }, - "acorn-walk": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", - "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", - "dev": true - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "devOptional": true, + "@octokit/rest": { + "version": "18.12.0", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz", + "integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==", "requires": { - "debug": "4" + "@octokit/core": "^3.5.1", + "@octokit/plugin-paginate-rest": "^2.16.8", + "@octokit/plugin-request-log": "^1.0.4", + "@octokit/plugin-rest-endpoint-methods": "^5.12.0" } }, - "agentkeepalive": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", - "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", - "devOptional": true, - "peer": true, + "@octokit/types": { + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", "requires": { - "debug": "^4.1.0", - "depd": "^1.1.2", - "humanize-ms": "^1.2.1" + "@octokit/openapi-types": "^12.11.0" } }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "devOptional": true, - "peer": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "optional": true }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, + "@sigstore/bundle": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-1.1.0.tgz", + "integrity": "sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog==", "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "@sigstore/protobuf-specs": "^0.2.0" } }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peer": true, - "requires": {} - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true + "@sigstore/protobuf-specs": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz", + "integrity": "sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A==" }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "devOptional": true, + "@sigstore/sign": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@sigstore/sign/-/sign-1.0.0.tgz", + "integrity": "sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA==", "requires": { - "type-fest": "^0.21.3" + "@sigstore/bundle": "^1.1.0", + "@sigstore/protobuf-specs": "^0.2.0", + "make-fetch-happen": "^11.0.1" }, "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "devOptional": true - } - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "devOptional": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "requires": { + "semver": "^7.3.5" + } + }, + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "requires": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "requires": { + "minipass": "^7.0.3" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==" + }, + "make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + } + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==" + }, + "minipass-fetch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "requires": { + "encoding": "^0.1.13", + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } + }, + "ssri": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "requires": { + "minipass": "^7.0.3" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "requires": { + "unique-slug": "^4.0.0" + } + }, + "unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "requires": { + "imurmurhash": "^0.1.4" + } + } + } + }, + "@sigstore/tuf": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@sigstore/tuf/-/tuf-1.0.3.tgz", + "integrity": "sha512-2bRovzs0nJZFlCN3rXirE4gwxCn97JNjMmwpecqlbgV9WcxX7WRuIrgzx/X7Ib7MYRbyUTpBYE0s2x6AmZXnlg==", "requires": { - "color-convert": "^2.0.1" + "@sigstore/protobuf-specs": "^0.2.0", + "tuf-js": "^1.1.7" } }, - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "@sindresorhus/is": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", + "integrity": "sha512-Qm9hBEBu18wt1PO2flE7LPb30BHMQt1eQgbV76YntdNk73XZGpn3izvGTYxbGgzXKgbCjiia0uxTd3aTNQrY/g==" + }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", "dev": true, "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "type-detect": "4.0.8" } }, - "app-module-path": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", - "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/samsam": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", + "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.6.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, - "aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", - "devOptional": true, - "peer": true + "@szmarczak/http-timer": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.5.tgz", + "integrity": "sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ==", + "requires": { + "defer-to-connect": "^2.0.0" + } }, - "are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "devOptional": true, - "peer": true, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "devOptional": true + }, + "@tufjs/canonical-json": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz", + "integrity": "sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ==" + }, + "@tufjs/models": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tufjs/models/-/models-1.0.4.tgz", + "integrity": "sha512-qaGV9ltJP0EO25YfFUPhxRVK0evXFIAGicsVXuRim4Ed9cjPxYhNnNJ49SFmbeLgtxpslIkX317IgpfcHPVj/A==", "requires": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" + "@tufjs/canonical-json": "1.0.0", + "minimatch": "^9.0.0" }, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "devOptional": true, - "peer": true, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "balanced-match": "^1.0.0" } }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "devOptional": true, - "peer": true - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "devOptional": true, - "peer": true, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "requires": { - "safe-buffer": "~5.2.0" + "brace-expansion": "^2.0.1" } } } }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "@types/babel__core": { + "version": "7.1.14", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz", + "integrity": "sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } }, - "aria-query": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", - "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", + "@types/babel__generator": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", + "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", "dev": true, - "peer": true, "requires": { - "@babel/runtime": "^7.10.2", - "@babel/runtime-corejs3": "^7.10.2" + "@babel/types": "^7.0.0" } }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-differ": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", - "devOptional": true - }, - "array-includes": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", - "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", + "@types/babel__template": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", + "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5", - "get-intrinsic": "^1.1.1", - "is-string": "^1.0.7" + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" } }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "devOptional": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "array.prototype.flat": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", - "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "@types/babel__traverse": { + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.1.tgz", + "integrity": "sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" + "@babel/types": "^7.3.0" } }, - "array.prototype.flatmap": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz", - "integrity": "sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg==", - "dev": true, - "peer": true, + "@types/cacheable-request": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.1.tgz", + "integrity": "sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ==", "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.2", - "es-shim-unscopables": "^1.0.0" + "@types/http-cache-semantics": "*", + "@types/keyv": "*", + "@types/node": "*", + "@types/responselike": "*" } }, - "arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "devOptional": true - }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", - "devOptional": true, - "peer": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "ast-module-types": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-2.7.1.tgz", - "integrity": "sha512-Rnnx/4Dus6fn7fTqdeLEAn5vUll5w7/vts0RN608yFa6si/rDOUonlIIiwugHBFWjylHjxm9owoSZn71KwG4gw==", - "dev": true - }, - "ast-types-flow": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", - "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", - "dev": true, - "peer": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "@types/debug": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz", + "integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==", "dev": true }, - "async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "devOptional": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "@types/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-jrm2K65CokCCX4NmowtA+MfXyuprZC13jbRuwprs6/04z/EcFg/MCwYdsHn+zgV4CQBiATiI7AEq7y1sZCtWKA==", "dev": true }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "@types/ejs": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/ejs/-/ejs-3.0.6.tgz", + "integrity": "sha512-fj1hi+ZSW0xPLrJJD+YNwIh9GZbyaIepG26E/gXvp8nCa2pYokxUYO1sK9qjGxp2g8ryZYuon7wmjpwE2cyASQ==", "dev": true }, - "axe-core": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.2.tgz", - "integrity": "sha512-LVAaGp/wkkgYJcjmHsoKx4juT1aQvJyPcW09MLCjVTh3V2cc6PnyempiLMNH5iMdfIX/zdbjUx2KDjMLCTdPeA==", - "dev": true, - "peer": true - }, - "axobject-query": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", - "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", - "dev": true, - "peer": true - }, - "babel-jest": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", - "integrity": "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==", + "@types/eslint": { + "version": "8.4.3", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.3.tgz", + "integrity": "sha512-YP1S7YJRMPs+7KZKDb9G63n8YejIwW9BALq7a5j2+H4yl6iOv9CB29edho+cuFRrvmJbbaH2yiVChKLJVysDGw==", "dev": true, + "peer": true, "requires": { - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/babel__core": "^7.1.7", - "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^26.6.2", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "slash": "^3.0.0" + "@types/estree": "*", + "@types/json-schema": "*" } }, - "babel-plugin-istanbul": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", - "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "@types/eslint-scope": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", "dev": true, + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^4.0.0", - "test-exclude": "^6.0.0" + "@types/eslint": "*", + "@types/estree": "*" } }, - "babel-plugin-jest-hoist": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz", - "integrity": "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==", + "@types/estree": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", - "@types/babel__traverse": "^7.0.6" - } + "peer": true }, - "babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "@types/expect": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", + "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==", + "devOptional": true + }, + "@types/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", "dev": true, "requires": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@types/minimatch": "*", + "@types/node": "*" } }, - "babel-preset-jest": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz", - "integrity": "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==", + "@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^26.6.2", - "babel-preset-current-node-syntax": "^1.0.0" + "@types/node": "*" } }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "@types/http-cache-semantics": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz", + "integrity": "sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==" }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "@types/inquirer": { + "version": "8.2.10", + "resolved": "https://registry.npmjs.org/@types/inquirer/-/inquirer-8.2.10.tgz", + "integrity": "sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA==", "dev": true, "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" + "@types/through": "*", + "rxjs": "^7.2.0" }, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dev": true, "requires": { - "is-descriptor": "^1.0.0" + "tslib": "^2.1.0" } + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true } } }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "devOptional": true - }, - "before-after-hook": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", - "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" + "@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "dev": true }, - "bin-links": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-3.0.3.tgz", - "integrity": "sha512-zKdnMPWEdh4F5INR07/eBrodC7QrF5JKvqskjz/ZZRXg5YSAZIbn8zGhbhUrElzHBZ2fvEQdOU59RHcTG3GiwA==", - "devOptional": true, - "peer": true, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, "requires": { - "cmd-shim": "^5.0.0", - "mkdirp-infer-owner": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0", - "read-cmd-shim": "^3.0.0", - "rimraf": "^3.0.0", - "write-file-atomic": "^4.0.0" - }, - "dependencies": { - "npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "devOptional": true, - "peer": true - }, - "write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "devOptional": true, - "peer": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - } - } + "@types/istanbul-lib-coverage": "*" } }, - "binaryextensions": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-4.18.0.tgz", - "integrity": "sha512-PQu3Kyv9dM4FnwB7XGj1+HucW+ShvJzJqjuw1JkKVs1mWdwOKVcRjOi+pV9X52A0tNvrPCsPkbFFQb+wE1EAXw==", - "devOptional": true, - "peer": true + "@types/istanbul-reports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz", + "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "devOptional": true, + "@types/jest": { + "version": "27.0.1", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.0.1.tgz", + "integrity": "sha512-HTLpVXHrY69556ozYkcq47TtQJXpcWAWfkoqz+ZGz2JnmZhzlRjprCIyFnetSy8gpDWwTTGBcRVv1J1I1vBrHw==", + "dev": true, "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" + "jest-diff": "^27.0.0", + "pretty-format": "^27.0.0" }, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "devOptional": true, + "@jest/types": { + "version": "27.1.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.1.0.tgz", + "integrity": "sha512-pRP5cLIzN7I7Vp6mHKRSaZD7YpBTK7hawx5si8trMKqk4+WOdK8NEKOTO2G8PKWD1HbKMVckVB6/XHh/olhf2g==", + "dev": true, "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" } }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "devOptional": true + "@types/yargs": { + "version": "16.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", + "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "devOptional": true, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "diff-sequences": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.0.6.tgz", + "integrity": "sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==", + "dev": true + }, + "jest-diff": { + "version": "27.1.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.1.0.tgz", + "integrity": "sha512-rjfopEYl58g/SZTsQFmspBODvMSytL16I+cirnScWTLkQVXYVZfxm78DFfdIIXc05RCYuGjxJqrdyG4PIFzcJg==", + "dev": true, "requires": { - "safe-buffer": "~5.2.0" + "chalk": "^4.0.0", + "diff-sequences": "^27.0.6", + "jest-get-type": "^27.0.6", + "pretty-format": "^27.1.0" + } + }, + "jest-get-type": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.0.6.tgz", + "integrity": "sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg==", + "dev": true + }, + "pretty-format": { + "version": "27.1.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.1.0.tgz", + "integrity": "sha512-4aGaud3w3rxAO6OXmK3fwBFQ0bctIOG3/if+jYEFGNGIs0EvuidQm3bZ9mlP2/t9epLNC/12czabfy7TZNSwVA==", + "dev": true, + "requires": { + "@jest/types": "^27.1.0", + "ansi-regex": "^5.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" } } } }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "@types/jest-json-schema": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@types/jest-json-schema/-/jest-json-schema-2.1.3.tgz", + "integrity": "sha512-WWL2gD1UyhYHFjIoSg9WEEI6hQKBG1C5CRIntU3jHXqiGcY6TW5lweDh6aY+IkskxWfpq/NAu9HzAbPEanX9rg==", + "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@types/jest": "*", + "ajv": "^6.10.2" } }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, + "@types/js-yaml": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.1.tgz", + "integrity": "sha512-xdOvNmXmrZqqPy3kuCQ+fz6wA0xU5pji9cd1nDrflWaAWtYLLGk5ykW0H6yg5TVyehHP1pfmuuSaZkhP+kspVA==", + "dev": true + }, + "@types/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ==" + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, + "@types/keyv": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.1.tgz", + "integrity": "sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==", "requires": { - "fill-range": "^7.0.1" + "@types/node": "*" } }, - "browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "@types/lodash": { + "version": "4.14.168", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.168.tgz", + "integrity": "sha512-oVfRvqHV/V6D1yifJbVRU3TMp8OT6o6BG+U9MkwuJ3U8/CsDHvalRpsxBqivn71ztOFZBTfJMvETbqHiaNSj7Q==", "dev": true }, - "browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "@types/mem-fs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@types/mem-fs/-/mem-fs-1.1.2.tgz", + "integrity": "sha512-tt+4IoDO8/wmtaP2bHnB91c8AnzYtR9MK6NxfcZY9E3XgtmzOiFMeSXu3EZrBeevd0nJ87iGoUiFDGsb9QUvew==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" + "@types/node": "*", + "@types/vinyl": "*" } }, - "bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "@types/mem-fs-editor": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@types/mem-fs-editor/-/mem-fs-editor-7.0.0.tgz", + "integrity": "sha512-fTwoRtwv7YYLnzZmkOOzlrCZBJQssUcBCHxy7y52iUyxkqVxXCDOSis9yQbanOMYHnijIEtkIhep8YTMeAuVDw==", "dev": true, "requires": { - "fast-json-stable-stringify": "2.x" - } - }, - "bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "@types/ejs": "*", + "@types/glob": "*", + "@types/json-schema": "*", + "@types/mem-fs": "*", + "@types/node": "*", + "@types/vinyl": "*" + } + }, + "@types/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==" + }, + "@types/node": { + "version": "15.14.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.14.7.tgz", + "integrity": "sha512-FA45p37/mLhpebgbPWWCKfOisTjxGK9lwcHlJ6XVLfu3NgfcazOJHdYUZCWPMK8QX4LhNZdmfo6iMz9FqpUbaw==" + }, + "@types/node-fetch": { + "version": "2.5.10", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.10.tgz", + "integrity": "sha512-IpkX0AasN44hgEad0gEF/V6EgR5n69VEqPEgnmoM8GsIGro3PowbWs4tR6IhxUTyPLpOn+fiGG6nrQhcmoCuIQ==", "dev": true, "requires": { - "node-int64": "^0.4.0" + "@types/node": "*", + "form-data": "^3.0.0" } }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "devOptional": true, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==" + }, + "@types/prettier": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.2.3.tgz", + "integrity": "sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA==", + "dev": true + }, + "@types/responselike": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", + "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "@types/node": "*" } }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "@types/stack-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", + "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", "dev": true }, - "builtins": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", - "integrity": "sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==", - "devOptional": true, - "peer": true + "@types/text-table": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@types/text-table/-/text-table-0.2.1.tgz", + "integrity": "sha512-dchbFCWfVgUSWEvhOkXGS7zjm+K7jCUvGrQkAHPk2Fmslfofp4HQTH2pqnQ3Pw5GPYv0zWa2AQjKtsfZThuemQ==", + "dev": true }, - "cacache": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", - "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "@types/through": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/through/-/through-0.0.30.tgz", + "integrity": "sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/vinyl": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.4.tgz", + "integrity": "sha512-2o6a2ixaVI2EbwBPg1QYLGQoHK56p/8X/sGfKbFC8N6sY9lfjsMf/GprtkQkSya0D4uRiutRZ2BWj7k3JvLsAQ==", "devOptional": true, - "peer": true, "requires": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" + "@types/expect": "^1.20.4", + "@types/node": "*" } }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "@types/yargs": { + "version": "15.0.13", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz", + "integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==", "dev": true, "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" + "@types/yargs-parser": "*" } }, - "cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==" + "@types/yargs-parser": { + "version": "20.2.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz", + "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", + "dev": true }, - "cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", + "@types/yeoman-environment": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yeoman-environment/-/yeoman-environment-2.10.3.tgz", + "integrity": "sha512-1QQaJcXXFz5U/r83M6XShIr6GN3ps1mf/w4cDBrAmIP9ip+CPU+JklriPT6IMi2wb0oGzifx3iwjqXpHF63BlA==", + "dev": true, "requires": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" + "@types/diff": "*", + "@types/inquirer": "*", + "@types/mem-fs": "*", + "@types/text-table": "*", + "@types/yeoman-generator": "*", + "chalk": "^4.1.0", + "rxjs": "^6.4.0" } }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "@types/yeoman-generator": { + "version": "5.2.14", + "resolved": "https://registry.npmjs.org/@types/yeoman-generator/-/yeoman-generator-5.2.14.tgz", + "integrity": "sha512-eIYBqQyURXiAaoU6jvJqMI+tNSG4s7EXtcHucLCgb8EV2vqz4x1WPr91MT0MiWHV8+9dDRrMkc1VZ6LduexuyA==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "@types/debug": "*", + "@types/ejs": "*", + "@types/inquirer": "^8", + "@types/mem-fs-editor": "*", + "@types/node": "*", + "@types/yeoman-environment": "*", + "rxjs": "^6.4.0" } }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true + "@typescript-eslint/eslint-plugin": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.22.1.tgz", + "integrity": "sha512-kVTAghWDDhsvQ602tHBc6WmQkdaYbkcTwZu+7l24jtJiYvm9l+/y/b2BZANEezxPDiX5MK2ZecE+9BFi/YJryw==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.22.1", + "@typescript-eslint/scope-manager": "4.22.1", + "debug": "^4.1.1", + "functional-red-black-tree": "^1.0.1", + "lodash": "^4.17.15", + "regexpp": "^3.0.0", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + } }, - "caniuse-lite": { - "version": "1.0.30001223", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", - "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", - "dev": true + "@typescript-eslint/experimental-utils": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.1.tgz", + "integrity": "sha512-svYlHecSMCQGDO2qN1v477ax/IDQwWhc7PRBiwAdAMJE7GXk5stF4Z9R/8wbRkuX/5e9dHqbIWxjeOjckK3wLQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.22.1", + "@typescript-eslint/types": "4.22.1", + "@typescript-eslint/typescript-estree": "4.22.1", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } }, - "capture-exit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", - "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", + "@typescript-eslint/parser": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.22.1.tgz", + "integrity": "sha512-l+sUJFInWhuMxA6rtirzjooh8cM/AATAe3amvIkqKFeMzkn85V+eLzb1RyuXkHak4dLfYzOmF6DXPyflJvjQnw==", "dev": true, "requires": { - "rsvp": "^4.8.4" + "@typescript-eslint/scope-manager": "4.22.1", + "@typescript-eslint/types": "4.22.1", + "@typescript-eslint/typescript-estree": "4.22.1", + "debug": "^4.1.1" } }, - "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "@typescript-eslint/scope-manager": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.22.1.tgz", + "integrity": "sha512-d5bAiPBiessSmNi8Amq/RuLslvcumxLmyhf1/Xa9IuaoFJ0YtshlJKxhlbY7l2JdEk3wS0EnmnfeJWSvADOe0g==", + "dev": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@typescript-eslint/types": "4.22.1", + "@typescript-eslint/visitor-keys": "4.22.1" } }, - "char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "@typescript-eslint/types": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.22.1.tgz", + "integrity": "sha512-2HTkbkdAeI3OOcWbqA8hWf/7z9c6gkmnWNGz0dKSLYLWywUlkOAQ2XcjhlKLj5xBFDf8FgAOF5aQbnLRvgNbCw==", "dev": true }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "devOptional": true - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "devOptional": true, - "peer": true - }, - "chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "@typescript-eslint/typescript-estree": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.22.1.tgz", + "integrity": "sha512-p3We0pAPacT+onSGM+sPR+M9CblVqdA9F1JEdIqRVlxK5Qth4ochXQgIyb9daBomyQKAXbygxp1aXQRV0GC79A==", "dev": true, - "peer": true - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true + "requires": { + "@typescript-eslint/types": "4.22.1", + "@typescript-eslint/visitor-keys": "4.22.1", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + } }, - "cjs-module-lexer": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", - "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", - "dev": true + "@typescript-eslint/visitor-keys": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.22.1.tgz", + "integrity": "sha512-WPkOrIRm+WCLZxXQHCi+WG8T2MMTUFR70rWjdWYddLT7cEfb2P4a3O/J2U1FBVsSFTocXLCoXWY6MZGejeStvQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.22.1", + "eslint-visitor-keys": "^2.0.0" + } }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", "dev": true, + "peer": true, "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" } }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "devOptional": true, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "dev": true, "peer": true }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "devOptional": true, - "requires": { - "restore-cursor": "^3.1.0" - } + "@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "dev": true, + "peer": true }, - "cli-spinners": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", - "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==", - "devOptional": true + "@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "dev": true, + "peer": true }, - "cli-table": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz", - "integrity": "sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==", - "devOptional": true, + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dev": true, "peer": true, "requires": { - "colors": "1.0.3" + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" } }, - "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "devOptional": true + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "dev": true, + "peer": true }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", "dev": true, + "peer": true, "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" } }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "devOptional": true, - "peer": true - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "devOptional": true, - "peer": true + "@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dev": true, + "peer": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } }, - "clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==", + "@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dev": true, + "peer": true, "requires": { - "mimic-response": "^1.0.0" + "@xtuc/long": "4.2.2" } }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "devOptional": true, + "@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "dev": true, "peer": true }, - "cloneable-readable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", - "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", - "devOptional": true, + "@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dev": true, "peer": true, "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "devOptional": true, - "peer": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "devOptional": true, - "peer": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "devOptional": true, - "peer": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" } }, - "cmd-shim": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-5.0.0.tgz", - "integrity": "sha512-qkCtZ59BidfEwHltnJwkyVZn+XQojdAySM1D1gSeh11Z4pW1Kpolkyo53L5noc0nrxmIvyFwTmJRo4xs7FFLPw==", - "devOptional": true, + "@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "dev": true, "peer": true, "requires": { - "mkdirp-infer-owner": "^2.0.0" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" } }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, - "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", - "dev": true - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", "dev": true, + "peer": true, "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dev": true, + "peer": true, "requires": { - "color-name": "~1.1.4" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "devOptional": true, - "peer": true - }, - "colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true - }, - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==", - "devOptional": true, - "peer": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", "dev": true, + "peer": true, "requires": { - "delayed-stream": "~1.0.0" + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" } }, - "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true - }, - "common-ancestor-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", - "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==", - "devOptional": true, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, "peer": true }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "devOptional": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "compress-brotli": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/compress-brotli/-/compress-brotli-1.3.8.tgz", - "integrity": "sha512-lVcQsjhxhIXsuupfy9fmZUFtAIdBmXA7EGY6GBdgZ++qkM9zG4YFT8iU7FoBxzryNDMOpD1HIFHUSX4D87oqhQ==", - "requires": { - "@types/json-buffer": "~3.0.0", - "json-buffer": "~3.0.1" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "peer": true }, - "confusing-browser-globals": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", - "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", + "abab": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", "dev": true }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "devOptional": true, - "peer": true + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", "dev": true, "requires": { - "safe-buffer": "~5.1.1" + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" } }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true, + "requires": {} }, - "copyfiles": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", - "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", "dev": true, "requires": { - "glob": "^7.0.5", - "minimatch": "^3.0.3", - "mkdirp": "^1.0.4", - "noms": "0.0.0", - "through2": "^2.0.1", - "untildify": "^4.0.0", - "yargs": "^16.1.0" + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" } }, - "core-js-pure": { - "version": "3.23.2", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.23.2.tgz", - "integrity": "sha512-t6u7H4Ff/yZNk+zqTr74UjCcZ3k8ApBryeLLV4rYQd9aF3gqmjjGjjR44ENfeBMH8VVvSynIjAJ0mUuFhzQtrA==", - "dev": true, - "peer": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "devOptional": true - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true }, - "cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dev": true, + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "requires": { - "cssom": "~0.3.6" - }, - "dependencies": { - "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true - } + "debug": "4" } }, - "damerau-levenshtein": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", - "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true, - "peer": true - }, - "dargs": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", - "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==" - }, - "data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", - "dev": true, + "agentkeepalive": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", "requires": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" } }, - "dateformat": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", - "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", - "devOptional": true, - "peer": true - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "requires": { - "ms": "2.1.2" + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" } }, - "debuglog": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", - "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==", - "devOptional": true, - "peer": true - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true - }, - "decomment": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/decomment/-/decomment-0.9.4.tgz", - "integrity": "sha512-8eNlhyI5cSU4UbBlrtagWpR03dqXcE5IR9zpe7PnO6UzReXDskucsD8usgrzUmQ6qJ3N82aws/p/mu/jqbURWw==", + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { - "esprima": "4.0.1" - } - }, - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "requires": { - "mimic-response": "^3.1.0" - }, - "dependencies": { - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" - } + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "devOptional": true - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", - "dev": true + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peer": true, + "requires": {} }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "devOptional": true, "requires": { - "clone": "^1.0.2" + "type-fest": "^0.21.3" }, "dependencies": { - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "devOptional": true } } }, - "defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" + "color-convert": "^2.0.1" } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "app-module-path": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/app-module-path/-/app-module-path-2.2.0.tgz", + "integrity": "sha1-ZBqlXft9am8KgUHEucCqULbCTdU=", "dev": true }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "devOptional": true, - "peer": true + "aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", "devOptional": true, - "peer": true - }, - "dependency-tree": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/dependency-tree/-/dependency-tree-8.1.0.tgz", - "integrity": "sha512-YKFK+1KXJOqVpsW6MkrIl/DyiW+KVG25V8NfRs27ANe+oSeCkQx2ROW1mBpp1bcm++5zj3Xv8wyFxHgX6TbM1w==", - "dev": true, + "peer": true, "requires": { - "commander": "^2.20.3", - "debug": "^4.3.1", - "filing-cabinet": "^3.0.0", - "precinct": "^7.0.0", - "typescript": "^3.9.7" + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" }, "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "devOptional": true, + "peer": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } }, - "typescript": { - "version": "3.9.9", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", - "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", - "dev": true + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "devOptional": true, + "peer": true + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "devOptional": true, + "peer": true, + "requires": { + "safe-buffer": "~5.2.0" + } } } }, - "deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" - }, - "detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, - "detective-amd": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detective-amd/-/detective-amd-3.1.0.tgz", - "integrity": "sha512-G7wGWT6f0VErjUkE2utCm7IUshT7nBh7aBBH2VBOiY9Dqy2DMens5iiOvYCuhstoIxRKLrnOvVAz4/EyPIAjnw==", - "dev": true, - "requires": { - "ast-module-types": "^2.7.0", - "escodegen": "^2.0.0", - "get-amd-module-type": "^3.0.0", - "node-source-walk": "^4.0.0" - } + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, - "detective-cjs": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/detective-cjs/-/detective-cjs-3.1.1.tgz", - "integrity": "sha512-JQtNTBgFY6h8uT6pgph5QpV3IyxDv+z3qPk/FZRDT9TlFfm5dnRtpH39WtQEr1khqsUxVqXzKjZHpdoQvQbllg==", + "aria-query": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", "dev": true, + "peer": true, "requires": { - "ast-module-types": "^2.4.0", - "node-source-walk": "^4.0.0" + "@babel/runtime": "^7.10.2", + "@babel/runtime-corejs3": "^7.10.2" } }, - "detective-es6": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/detective-es6/-/detective-es6-2.2.0.tgz", - "integrity": "sha512-fSpNY0SLER7/sVgQZ1NxJPwmc9uCTzNgdkQDhAaj8NPYwr7Qji9QBcmbNvtMCnuuOGMuKn3O7jv0An+/WRWJZQ==", - "dev": true, - "requires": { - "node-source-walk": "^4.0.0" - } + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true }, - "detective-less": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/detective-less/-/detective-less-1.0.2.tgz", - "integrity": "sha512-Rps1xDkEEBSq3kLdsdnHZL1x2S4NGDcbrjmd4q+PykK5aJwDdP5MBgrJw1Xo+kyUHuv3JEzPqxr+Dj9ryeDRTA==", - "dev": true, - "requires": { - "debug": "^4.0.0", - "gonzales-pe": "^4.2.3", - "node-source-walk": "^4.0.0" - } + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true }, - "detective-postcss": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detective-postcss/-/detective-postcss-4.0.0.tgz", - "integrity": "sha512-Fwc/g9VcrowODIAeKRWZfVA/EufxYL7XfuqJQFroBKGikKX83d2G7NFw6kDlSYGG3LNQIyVa+eWv1mqre+v4+A==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "is-url": "^1.2.4", - "postcss": "^8.1.7", - "postcss-values-parser": "^2.0.1" - } + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true }, - "detective-sass": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/detective-sass/-/detective-sass-3.0.1.tgz", - "integrity": "sha512-oSbrBozRjJ+QFF4WJFbjPQKeakoaY1GiR380NPqwdbWYd5wfl5cLWv0l6LsJVqrgWfFN1bjFqSeo32Nxza8Lbw==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "gonzales-pe": "^4.2.3", - "node-source-walk": "^4.0.0" - } + "array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==" }, - "detective-scss": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detective-scss/-/detective-scss-2.0.1.tgz", - "integrity": "sha512-VveyXW4WQE04s05KlJ8K0bG34jtHQVgTc9InspqoQxvnelj/rdgSAy7i2DXAazyQNFKlWSWbS+Ro2DWKFOKTPQ==", + "array-includes": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.5.tgz", + "integrity": "sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ==", "dev": true, "requires": { - "debug": "^4.1.1", - "gonzales-pe": "^4.2.3", - "node-source-walk": "^4.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.7" } }, - "detective-stylus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detective-stylus/-/detective-stylus-1.0.0.tgz", - "integrity": "sha1-UK7n24uruZA4HwEMY/q7pbWOVM0=", + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, - "detective-typescript": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-7.0.0.tgz", - "integrity": "sha512-y/Ev98AleGvl43YKTNcA2Q+lyFmsmCfTTNWy4cjEJxoLkbobcXtRS0Kvx06daCgr2GdtlwLfNzL553BkktfJoA==", + "array.prototype.flat": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "^4.8.2", - "ast-module-types": "^2.7.1", - "node-source-walk": "^4.2.0", - "typescript": "^3.9.7" - }, - "dependencies": { - "typescript": { - "version": "3.9.9", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", - "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", - "dev": true - } + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" } }, - "dezalgo": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", - "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", - "devOptional": true, + "array.prototype.flatmap": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz", + "integrity": "sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg==", + "dev": true, "peer": true, "requires": { - "asap": "^2.0.0", - "wrappy": "1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.2", + "es-shim-unscopables": "^1.0.0" } }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true + "arrify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", + "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" }, - "diff-sequences": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", - "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "devOptional": true, + "peer": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "devOptional": true, - "requires": { - "path-type": "^4.0.0" - } + "ast-module-types": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-2.7.1.tgz", + "integrity": "sha512-Rnnx/4Dus6fn7fTqdeLEAn5vUll5w7/vts0RN608yFa6si/rDOUonlIIiwugHBFWjylHjxm9owoSZn71KwG4gw==", + "dev": true }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "ast-types-flow": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", - "dev": true, - "requires": { - "webidl-conversions": "^5.0.0" - }, - "dependencies": { - "webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true - } - } - }, - "ejs": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", - "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", - "dev": true, - "requires": { - "jake": "^10.8.5" - } + "peer": true }, - "ejs-include-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/ejs-include-regex/-/ejs-include-regex-1.0.0.tgz", - "integrity": "sha1-4vcVdcv9VRrIALJHTB9io45wCTo=", + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, - "ejs-lint": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/ejs-lint/-/ejs-lint-1.2.2.tgz", - "integrity": "sha512-ESR/MePvJJJfkK3EUAYlPKe2JM2nRDc4uFkGgbB5Prr06nluN7JozNVFL3Ze7LV7xNY7JPWEi5H3i4hOl6mxXw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "ejs": "3.1.7", - "ejs-include-regex": "^1.0.0", - "globby": "^11.0.0", - "read-input": "^0.3.1", - "slash": "^3.0.0", - "syntax-error": "^1.1.6", - "yargs": "^16.0.0" - } + "async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" }, - "electron-to-chromium": { - "version": "1.3.727", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", - "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, - "emittery": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", - "integrity": "sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==", + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "devOptional": true - }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "optional": true, - "peer": true, - "requires": { - "iconv-lite": "^0.6.2" - }, - "dependencies": { - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "optional": true, - "peer": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - } - } + "axe-core": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.2.tgz", + "integrity": "sha512-LVAaGp/wkkgYJcjmHsoKx4juT1aQvJyPcW09MLCjVTh3V2cc6PnyempiLMNH5iMdfIX/zdbjUx2KDjMLCTdPeA==", + "dev": true, + "peer": true }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } + "axobject-query": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", + "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", + "dev": true, + "peer": true }, - "enhanced-resolve": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", - "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", + "babel-jest": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", + "integrity": "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==", "dev": true, "requires": { + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^26.6.2", + "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" + "slash": "^3.0.0" } }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "babel-plugin-istanbul": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", + "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", "dev": true, "requires": { - "ansi-colors": "^4.1.1" + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" } }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "devOptional": true, - "peer": true - }, - "err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "devOptional": true, - "peer": true - }, - "error": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/error/-/error-10.4.0.tgz", - "integrity": "sha512-YxIFEJuhgcICugOUvRx5th0UM+ActZ9sjY0QJmeVwsQdvosZ7kYzc9QqS0Da3R5iUmgU5meGIxh0xBeZpMVeLw==", - "devOptional": true, - "peer": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "babel-plugin-jest-hoist": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz", + "integrity": "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==", + "dev": true, "requires": { - "is-arrayish": "^0.2.1" + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", + "@types/babel__traverse": "^7.0.6" } }, - "es-abstract": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.0.tgz", - "integrity": "sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA==", + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "regexp.prototype.flags": "^1.4.1", - "string.prototype.trimend": "^1.0.5", - "string.prototype.trimstart": "^1.0.5", - "unbox-primitive": "^1.0.2" + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" } }, - "es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true, - "peer": true - }, - "es-shim-unscopables": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", - "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "babel-preset-jest": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz", + "integrity": "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==", "dev": true, - "peer": true, "requires": { - "has": "^1.0.3" + "babel-plugin-jest-hoist": "^26.6.2", + "babel-preset-current-node-syntax": "^1.0.0" } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + } } }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "devOptional": true }, - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true + "before-after-hook": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", + "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" }, - "escodegen": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", - "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", - "dev": true, + "bin-links": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-3.0.3.tgz", + "integrity": "sha512-zKdnMPWEdh4F5INR07/eBrodC7QrF5JKvqskjz/ZZRXg5YSAZIbn8zGhbhUrElzHBZ2fvEQdOU59RHcTG3GiwA==", + "devOptional": true, + "peer": true, "requires": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" + "cmd-shim": "^5.0.0", + "mkdirp-infer-owner": "^2.0.0", + "npm-normalize-package-bin": "^2.0.0", + "read-cmd-shim": "^3.0.0", + "rimraf": "^3.0.0", + "write-file-atomic": "^4.0.0" }, "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true + "npm-normalize-package-bin": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", + "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", + "devOptional": true, + "peer": true }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, + "write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "devOptional": true, + "peer": true, "requires": { - "prelude-ls": "~1.1.2" + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" } } } }, - "eslint": { - "version": "7.26.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.26.0.tgz", - "integrity": "sha512-4R1ieRf52/izcZE7AlLy56uIHHDLT74Yzz2Iv2l6kDaYvEu9x+wMB5dZArVL8SYGXSYV2YAg70FcW5Y5nGGNIg==", - "dev": true, + "binaryextensions": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-4.18.0.tgz", + "integrity": "sha512-PQu3Kyv9dM4FnwB7XGj1+HucW+ShvJzJqjuw1JkKVs1mWdwOKVcRjOi+pV9X52A0tNvrPCsPkbFFQb+wE1EAXw==" + }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "devOptional": true, "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.1", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash": "^4.17.21", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.4", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "devOptional": true, "requires": { - "sprintf-js": "~1.0.2" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "devOptional": true + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "devOptional": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "safe-buffer": "~5.2.0" } } } }, - "eslint-config-airbnb": { - "version": "18.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz", - "integrity": "sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==", - "dev": true, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { - "eslint-config-airbnb-base": "^14.2.1", - "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "eslint-config-airbnb-base": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", - "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", - "dev": true, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "requires": { - "confusing-browser-globals": "^1.0.10", - "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "fill-range": "^7.0.1" } }, - "eslint-config-prettier": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", - "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", - "dev": true, - "requires": {} + "browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true }, - "eslint-import-resolver-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "browserslist": { + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", "dev": true, "requires": { - "debug": "^2.6.9", - "resolve": "^1.13.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" } }, - "eslint-import-resolver-typescript": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.4.0.tgz", - "integrity": "sha512-useJKURidCcldRLCNKWemr1fFQL1SzB3G4a0li6lFGvlc5xGe1hY343bvG07cbpCzPuM/lK19FIJB3XGFSkplA==", + "bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", "dev": true, "requires": { - "debug": "^4.1.1", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" + "fast-json-stable-stringify": "2.x" } }, - "eslint-module-utils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", - "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", "dev": true, "requires": { - "debug": "^2.6.9", - "pkg-dir": "^2.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } + "node-int64": "^0.4.0" } }, - "eslint-plugin-import": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", - "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", - "dev": true, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "devOptional": true, "requires": { - "array-includes": "^3.1.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", - "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.4", - "eslint-module-utils": "^2.6.0", - "has": "^1.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, - "eslint-plugin-json": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-json/-/eslint-plugin-json-2.1.2.tgz", - "integrity": "sha512-isM/fsUxS4wN1+nLsWoV5T4gLgBQnsql3nMTr8u+cEls1bL8rRQO5CP5GtxJxaOfbcKqnz401styw+H/P+e78Q==", - "dev": true, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtins": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ==", + "devOptional": true, + "peer": true + }, + "cacache": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", + "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", + "devOptional": true, + "peer": true, "requires": { - "lodash": "^4.17.19", - "vscode-json-languageservice": "^3.7.0" + "@npmcli/fs": "^1.0.0", + "@npmcli/move-file": "^1.0.1", + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "glob": "^7.1.4", + "infer-owner": "^1.0.4", + "lru-cache": "^6.0.0", + "minipass": "^3.1.1", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.2", + "mkdirp": "^1.0.3", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.0.2", + "unique-filename": "^1.1.1" } }, - "eslint-plugin-jsx-a11y": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz", - "integrity": "sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==", + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, - "peer": true, "requires": { - "@babel/runtime": "^7.16.3", - "aria-query": "^4.2.2", - "array-includes": "^3.1.4", - "ast-types-flow": "^0.0.7", - "axe-core": "^4.3.5", - "axobject-query": "^2.2.0", - "damerau-levenshtein": "^1.0.7", - "emoji-regex": "^9.2.2", - "has": "^1.0.3", - "jsx-ast-utils": "^3.2.1", - "language-tags": "^1.0.5", - "minimatch": "^3.0.4" - }, - "dependencies": { - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true, - "peer": true - } + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, - "eslint-plugin-prettier": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz", - "integrity": "sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==", - "dev": true, + "cacheable-lookup": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==" + }, + "cacheable-request": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", + "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", "requires": { - "prettier-linter-helpers": "^1.0.0" + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^4.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^6.0.1", + "responselike": "^2.0.0" } }, - "eslint-plugin-react": { - "version": "7.30.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.30.0.tgz", - "integrity": "sha512-RgwH7hjW48BleKsYyHK5vUAvxtE9SMPDKmcPRQgtRCYaZA0XQPt5FSkrU3nhz5ifzMZcA8opwmRJ2cmOO8tr5A==", + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, - "peer": true, "requires": { - "array-includes": "^3.1.5", - "array.prototype.flatmap": "^1.3.0", - "doctrine": "^2.1.0", - "estraverse": "^5.3.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.5", - "object.fromentries": "^2.0.5", - "object.hasown": "^1.1.1", - "object.values": "^1.1.5", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.3", - "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.7" - }, - "dependencies": { - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "peer": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "peer": true - }, - "resolve": { - "version": "2.0.0-next.4", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", - "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", - "dev": true, - "peer": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "peer": true - } - } - }, - "eslint-plugin-react-hooks": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", - "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", - "dev": true, - "peer": true, - "requires": {} - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" } }, - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "devOptional": true + "caniuse-lite": { + "version": "1.0.30001223", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", + "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", + "dev": true }, - "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "capture-exit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", + "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", "dev": true, "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } + "rsvp": "^4.8.4" } }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "devOptional": true }, - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "devOptional": true, - "peer": true + "chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", "dev": true, "peer": true }, - "exec-sh": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz", - "integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==", + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", "dev": true }, - "execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "cjs-module-lexer": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", + "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", "dev": true }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { - "debug": "^2.3.3", + "arr-union": "^3.1.0", "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", @@ -18508,15 +19185,6 @@ "is-descriptor": "^0.1.0" } }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -18568,3848 +19236,3875 @@ "kind-of": "^5.0.0" } }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, - "expect": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", - "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", - "dev": true, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "devOptional": true, "requires": { - "@jest/types": "^26.6.2", - "ansi-styles": "^4.0.0", - "jest-get-type": "^26.3.0", - "jest-matcher-utils": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-regex-util": "^26.0.0" + "restore-cursor": "^3.1.0" } }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "cli-spinners": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", + "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==", + "devOptional": true + }, + "cli-table": { + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz", + "integrity": "sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==", + "devOptional": true, + "peer": true, + "requires": { + "colors": "1.0.3" + } + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "devOptional": true + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "devOptional": true, + "peer": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", "devOptional": true, + "peer": true + }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==", "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" + "mimic-response": "^1.0.0" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "devOptional": true, + "peer": true + }, + "cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "devOptional": true, + "peer": true, "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" }, "dependencies": { - "define-property": { + "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "devOptional": true, + "peer": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "devOptional": true, + "peer": true, "requires": { - "is-descriptor": "^1.0.0" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "devOptional": true, + "peer": true, "requires": { - "is-extendable": "^0.1.0" + "safe-buffer": "~5.1.0" } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true } } }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "cmd-shim": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-5.0.0.tgz", + "integrity": "sha512-qkCtZ59BidfEwHltnJwkyVZn+XQojdAySM1D1gSeh11Z4pW1Kpolkyo53L5noc0nrxmIvyFwTmJRo4xs7FFLPw==", "devOptional": true, + "peer": true, "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" + "mkdirp-infer-owner": "^2.0.0" } }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", "dev": true }, - "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "devOptional": true, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, "requires": { - "reusify": "^1.0.4" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, - "fb-watchman": { + "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", - "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", - "dev": true, + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { - "bser": "2.1.1" + "color-name": "~1.1.4" } }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "devOptional": true, - "requires": { - "escape-string-regexp": "^1.0.5" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "devOptional": true - } - } + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" }, - "filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "devOptional": true, - "requires": { - "minimatch": "^5.0.1" - }, - "dependencies": { - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "devOptional": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", - "devOptional": true, - "requires": { - "brace-expansion": "^2.0.1" - } - } - } + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true }, - "filing-cabinet": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/filing-cabinet/-/filing-cabinet-3.0.0.tgz", - "integrity": "sha512-o8Qac5qxZ1uVidR4Sd7ZQbbqObFZlqXU4xu1suAYg9PQPcQFNTzOmxQa/MehIDMgIvXHTb42mWPNV9l3eHBPSw==", + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==", + "devOptional": true, + "peer": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { - "app-module-path": "^2.2.0", - "commander": "^2.20.3", - "debug": "^4.3.1", - "decomment": "^0.9.3", - "enhanced-resolve": "^5.3.2", - "is-relative-path": "^1.0.2", - "module-definition": "^3.3.1", - "module-lookup-amd": "^7.0.0", - "resolve": "^1.19.0", - "resolve-dependency-path": "^2.0.0", - "sass-lookup": "^3.0.0", - "stylus-lookup": "^3.0.1", - "typescript": "^3.9.7" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "typescript": { - "version": "3.9.9", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", - "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", - "dev": true - } + "delayed-stream": "~1.0.0" } }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "common-ancestor-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz", + "integrity": "sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==", "devOptional": true, - "requires": { - "to-regex-range": "^5.0.1" - } + "peer": true }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, - "find-yarn-workspace-root2": { - "version": "1.2.16", - "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", - "integrity": "sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==", - "devOptional": true, - "peer": true, - "requires": { - "micromatch": "^4.0.2", - "pkg-dir": "^4.2.0" - }, - "dependencies": { - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "devOptional": true, - "peer": true, - "requires": { - "find-up": "^4.0.0" - } - } - } + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true }, - "first-chunk-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", - "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", - "devOptional": true, - "peer": true, + "compress-brotli": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/compress-brotli/-/compress-brotli-1.3.8.tgz", + "integrity": "sha512-lVcQsjhxhIXsuupfy9fmZUFtAIdBmXA7EGY6GBdgZ++qkM9zG4YFT8iU7FoBxzryNDMOpD1HIFHUSX4D87oqhQ==", "requires": { - "readable-stream": "^2.0.2" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "devOptional": true, - "peer": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "devOptional": true, - "peer": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "devOptional": true, - "peer": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } + "@types/json-buffer": "~3.0.0", + "json-buffer": "~3.0.1" } }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "flatted": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", - "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "confusing-browser-globals": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", "dev": true }, - "flatten": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", - "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==", - "dev": true + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" + "safe-buffer": "~5.1.1" } }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "devOptional": true, - "peer": true, + "copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "dev": true, "requires": { - "minipass": "^3.0.0" + "glob": "^7.0.5", + "minimatch": "^3.0.3", + "mkdirp": "^1.0.4", + "noms": "0.0.0", + "through2": "^2.0.1", + "untildify": "^4.0.0", + "yargs": "^16.1.0" } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "core-js-pure": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.23.2.tgz", + "integrity": "sha512-t6u7H4Ff/yZNk+zqTr74UjCcZ3k8ApBryeLLV4rYQd9aF3gqmjjGjjR44ENfeBMH8VVvSynIjAJ0mUuFhzQtrA==", "dev": true, - "optional": true + "peer": true }, - "function-bind": { + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "devOptional": true + }, + "create-require": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true }, - "function.prototype.name": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", - "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", - "dev": true, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0", - "functions-have-names": "^1.2.2" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "cssom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", "dev": true }, - "gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "devOptional": true, - "peer": true, + "cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dev": true, "requires": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" + "cssom": "~0.3.6" + }, + "dependencies": { + "cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + } } }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true + "damerau-levenshtein": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", + "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", + "dev": true, + "peer": true }, - "get-amd-module-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-amd-module-type/-/get-amd-module-type-3.0.0.tgz", - "integrity": "sha512-99Q7COuACPfVt18zH9N4VAMyb81S6TUgJm2NgV6ERtkh9VIkAaByZkW530wl3lLN5KTtSrK9jVLxYsoP5hQKsw==", + "dargs": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", + "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==" + }, + "data-urls": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", "dev": true, "requires": { - "ast-module-types": "^2.3.2", - "node-source-walk": "^4.0.0" + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "dateformat": { + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", + "devOptional": true, + "peer": true }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "ms": "2.1.2" } }, - "get-own-enumerable-property-symbols": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", - "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", + "debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==", + "devOptional": true, + "peer": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "decimal.js": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", + "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", "dev": true }, - "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "requires": { - "pump": "^3.0.0" - } + "decode-uri-component": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", + "dev": true }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "decomment": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/decomment/-/decomment-0.9.4.tgz", + "integrity": "sha512-8eNlhyI5cSU4UbBlrtagWpR03dqXcE5IR9zpe7PnO6UzReXDskucsD8usgrzUmQ6qJ3N82aws/p/mu/jqbURWw==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "esprima": "4.0.1" } }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "github-username": { + "decompress-response": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/github-username/-/github-username-6.0.0.tgz", - "integrity": "sha512-7TTrRjxblSI5l6adk9zd+cV5d6i1OrJSo3Vr9xdGqFLBQo0mz5P9eIfKCDJ7eekVGGFLbce0qbPSnktXV2BjDQ==", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "requires": { - "@octokit/rest": "^18.0.6" + "mimic-response": "^3.1.0" + }, + "dependencies": { + "mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==" + } } }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, - "requires": { - "is-glob": "^4.0.1" - } + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true }, - "globals": { - "version": "13.8.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", - "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", "devOptional": true, "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "clone": "^1.0.2" }, "dependencies": { - "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", "devOptional": true } } }, - "gonzales-pe": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz", - "integrity": "sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==", + "defer-to-connect": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" + }, + "define-properties": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dev": true, "requires": { - "minimist": "^1.2.5" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" } }, - "got": { - "version": "11.8.5", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.5.tgz", - "integrity": "sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==", + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, "requires": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" } }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "devOptional": true + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true }, - "graphviz": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/graphviz/-/graphviz-0.0.9.tgz", - "integrity": "sha512-SmoY2pOtcikmMCqCSy2NO1YsRfu9OO0wpTlOYW++giGjfX1a6gax/m1Fo8IdUd0/3H15cTOfR1SMKwohj4LKsg==", + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==" + }, + "dependency-tree": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/dependency-tree/-/dependency-tree-8.1.0.tgz", + "integrity": "sha512-YKFK+1KXJOqVpsW6MkrIl/DyiW+KVG25V8NfRs27ANe+oSeCkQx2ROW1mBpp1bcm++5zj3Xv8wyFxHgX6TbM1w==", "dev": true, "requires": { - "temp": "~0.4.0" + "commander": "^2.20.3", + "debug": "^4.3.1", + "filing-cabinet": "^3.0.0", + "precinct": "^7.0.0", + "typescript": "^3.9.7" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true + } } }, - "grouped-queue": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grouped-queue/-/grouped-queue-2.0.0.tgz", - "integrity": "sha512-/PiFUa7WIsl48dUeCvhIHnwNmAAzlI/eHoJl0vu3nsFA366JleY7Ff8EVTplZu5kO0MIdZjKTTnzItL61ahbnw==", - "devOptional": true, - "peer": true + "deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" }, - "growly": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", - "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "detective-amd": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detective-amd/-/detective-amd-3.1.0.tgz", + "integrity": "sha512-G7wGWT6f0VErjUkE2utCm7IUshT7nBh7aBBH2VBOiY9Dqy2DMens5iiOvYCuhstoIxRKLrnOvVAz4/EyPIAjnw==", "dev": true, - "optional": true + "requires": { + "ast-module-types": "^2.7.0", + "escodegen": "^2.0.0", + "get-amd-module-type": "^3.0.0", + "node-source-walk": "^4.0.0" + } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "detective-cjs": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/detective-cjs/-/detective-cjs-3.1.1.tgz", + "integrity": "sha512-JQtNTBgFY6h8uT6pgph5QpV3IyxDv+z3qPk/FZRDT9TlFfm5dnRtpH39WtQEr1khqsUxVqXzKjZHpdoQvQbllg==", + "dev": true, "requires": { - "function-bind": "^1.1.1" + "ast-module-types": "^2.4.0", + "node-source-walk": "^4.0.0" } }, - "has-bigints": { + "detective-es6": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/detective-es6/-/detective-es6-2.2.0.tgz", + "integrity": "sha512-fSpNY0SLER7/sVgQZ1NxJPwmc9uCTzNgdkQDhAaj8NPYwr7Qji9QBcmbNvtMCnuuOGMuKn3O7jv0An+/WRWJZQ==", + "dev": true, + "requires": { + "node-source-walk": "^4.0.0" + } + }, + "detective-less": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true + "resolved": "https://registry.npmjs.org/detective-less/-/detective-less-1.0.2.tgz", + "integrity": "sha512-Rps1xDkEEBSq3kLdsdnHZL1x2S4NGDcbrjmd4q+PykK5aJwDdP5MBgrJw1Xo+kyUHuv3JEzPqxr+Dj9ryeDRTA==", + "dev": true, + "requires": { + "debug": "^4.0.0", + "gonzales-pe": "^4.2.3", + "node-source-walk": "^4.0.0" + } }, - "has-flag": { + "detective-postcss": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "resolved": "https://registry.npmjs.org/detective-postcss/-/detective-postcss-4.0.0.tgz", + "integrity": "sha512-Fwc/g9VcrowODIAeKRWZfVA/EufxYL7XfuqJQFroBKGikKX83d2G7NFw6kDlSYGG3LNQIyVa+eWv1mqre+v4+A==", "dev": true, "requires": { - "get-intrinsic": "^1.1.1" + "debug": "^4.1.1", + "is-url": "^1.2.4", + "postcss": "^8.1.7", + "postcss-values-parser": "^2.0.1" } }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "detective-sass": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/detective-sass/-/detective-sass-3.0.1.tgz", + "integrity": "sha512-oSbrBozRjJ+QFF4WJFbjPQKeakoaY1GiR380NPqwdbWYd5wfl5cLWv0l6LsJVqrgWfFN1bjFqSeo32Nxza8Lbw==", "dev": true, "requires": { - "has-symbols": "^1.0.2" + "debug": "^4.1.1", + "gonzales-pe": "^4.2.3", + "node-source-walk": "^4.0.0" } }, - "has-unicode": { + "detective-scss": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "devOptional": true, - "peer": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "resolved": "https://registry.npmjs.org/detective-scss/-/detective-scss-2.0.1.tgz", + "integrity": "sha512-VveyXW4WQE04s05KlJ8K0bG34jtHQVgTc9InspqoQxvnelj/rdgSAy7i2DXAazyQNFKlWSWbS+Ro2DWKFOKTPQ==", "dev": true, "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "debug": "^4.1.1", + "gonzales-pe": "^4.2.3", + "node-source-walk": "^4.0.0" } }, - "has-values": { + "detective-stylus": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "resolved": "https://registry.npmjs.org/detective-stylus/-/detective-stylus-1.0.0.tgz", + "integrity": "sha1-UK7n24uruZA4HwEMY/q7pbWOVM0=", + "dev": true + }, + "detective-typescript": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-7.0.0.tgz", + "integrity": "sha512-y/Ev98AleGvl43YKTNcA2Q+lyFmsmCfTTNWy4cjEJxoLkbobcXtRS0Kvx06daCgr2GdtlwLfNzL553BkktfJoA==", "dev": true, "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "@typescript-eslint/typescript-estree": "^4.8.2", + "ast-module-types": "^2.7.1", + "node-source-walk": "^4.2.0", + "typescript": "^3.9.7" }, "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } + "typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true } } }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" - }, - "html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", - "dev": true, + "dezalgo": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", + "devOptional": true, + "peer": true, "requires": { - "whatwg-encoding": "^1.0.5" + "asap": "^2.0.0", + "wrappy": "1" } }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==" + "diff-sequences": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "dev": true }, - "http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "devOptional": true, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "requires": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" + "path-type": "^4.0.0" } }, - "http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, "requires": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" + "esutils": "^2.0.2" } }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "devOptional": true, + "domexception": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "dev": true, "requires": { - "agent-base": "6", - "debug": "4" + "webidl-conversions": "^5.0.0" + }, + "dependencies": { + "webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "dev": true + } } }, - "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "devOptional": true, - "peer": true, + "ejs": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", + "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", + "dev": true, "requires": { - "ms": "^2.0.0" + "jake": "^10.8.5" } }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "devOptional": true, + "ejs-include-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ejs-include-regex/-/ejs-include-regex-1.0.0.tgz", + "integrity": "sha1-4vcVdcv9VRrIALJHTB9io45wCTo=", + "dev": true + }, + "ejs-lint": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/ejs-lint/-/ejs-lint-1.2.2.tgz", + "integrity": "sha512-ESR/MePvJJJfkK3EUAYlPKe2JM2nRDc4uFkGgbB5Prr06nluN7JozNVFL3Ze7LV7xNY7JPWEi5H3i4hOl6mxXw==", + "dev": true, "requires": { - "safer-buffer": ">= 2.1.2 < 3" + "chalk": "^4.0.0", + "ejs": "3.1.7", + "ejs-include-regex": "^1.0.0", + "globby": "^11.0.0", + "read-input": "^0.3.1", + "slash": "^3.0.0", + "syntax-error": "^1.1.6", + "yargs": "^16.0.0" } }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "devOptional": true + "electron-to-chromium": { + "version": "1.3.727", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", + "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", + "dev": true }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "emittery": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", + "integrity": "sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==", "dev": true }, - "ignore-walk": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-4.0.1.tgz", - "integrity": "sha512-rzDQLaW4jQbh2YrOFlJdCtX8qgJTehFRYiUB2r1osqTeDzV/3+Jh8fz1oAPzUThf3iku8Ds4IDqawI5d8mUiQw==", - "devOptional": true, - "peer": true, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "optional": true, "requires": { - "minimatch": "^3.0.4" + "iconv-lite": "^0.6.2" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } } }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "once": "^1.4.0" } }, - "import-local": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", - "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "enhanced-resolve": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", + "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", "dev": true, "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "dependencies": { - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - } + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" } }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "devOptional": true + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "devOptional": true, - "peer": true + "env-paths": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", + "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==" }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", - "dev": true + "err-code": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", + "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==" }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "error": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/error/-/error-10.4.0.tgz", + "integrity": "sha512-YxIFEJuhgcICugOUvRx5th0UM+ActZ9sjY0QJmeVwsQdvosZ7kYzc9QqS0Da3R5iUmgU5meGIxh0xBeZpMVeLw==", "devOptional": true, "peer": true }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "inquirer": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", - "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", - "dev": true, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.19", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" + "is-arrayish": "^0.2.1" } }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "es-abstract": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.0.tgz", + "integrity": "sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA==", "dev": true, "requires": { - "get-intrinsic": "^1.1.0", + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", "has": "^1.0.3", - "side-channel": "^1.0.4" + "has-property-descriptors": "^1.0.0", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "regexp.prototype.flags": "^1.4.1", + "string.prototype.trimend": "^1.0.5", + "string.prototype.trimstart": "^1.0.5", + "unbox-primitive": "^1.0.2" } }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" - }, - "ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", - "devOptional": true, + "es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "dev": true, "peer": true }, - "is-accessor-descriptor": { + "es-shim-unscopables": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", "dev": true, + "peer": true, "requires": { - "has-bigints": "^1.0.1" + "has": "^1.0.3" } }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" } }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, - "is-ci": { + "escape-string-regexp": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, - "is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", - "requires": { - "has": "^1.0.3" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-date-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", - "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "escodegen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + } } }, - "is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "optional": true - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "eslint": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.26.0.tgz", + "integrity": "sha512-4R1ieRf52/izcZE7AlLy56uIHHDLT74Yzz2Iv2l6kDaYvEu9x+wMB5dZArVL8SYGXSYV2YAg70FcW5Y5nGGNIg==", "dev": true, "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "devOptional": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "devOptional": true - }, - "is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "devOptional": true, - "requires": { - "is-extglob": "^2.1.1" + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.1", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } } }, - "is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "devOptional": true - }, - "is-lambda": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "devOptional": true, - "peer": true - }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true - }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "eslint-config-airbnb": { + "version": "18.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.2.1.tgz", + "integrity": "sha512-glZNDEZ36VdlZWoxn/bUR1r/sdFKPd1mHPbqUtkctgNG4yT2DLLtJ3D+yCV+jzZCc2V1nBVkmdknOJBZ5Hc0fg==", "dev": true, "requires": { - "has-tostringtag": "^1.0.0" + "eslint-config-airbnb-base": "^14.2.1", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" } }, - "is-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "eslint-config-airbnb-base": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", + "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", "dev": true, "requires": { - "isobject": "^3.0.1" + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" } }, - "is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "eslint-config-prettier": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", - "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", - "dev": true - }, - "is-relative-path": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-relative-path/-/is-relative-path-1.0.2.tgz", - "integrity": "sha1-CRtGoNZ8HtD+hfH4z93gBrslHUY=", - "dev": true + "requires": {} }, - "is-scoped": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-2.1.0.tgz", - "integrity": "sha512-Cv4OpPTHAK9kHYzkzCrof3VJh7H/PrG2MBUMvvJebaaUMbqhm0YAtXnvh0I3Hnj2tMZWwrRROWLSgfJrKqWmlQ==", - "devOptional": true, - "peer": true, + "eslint-import-resolver-node": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "dev": true, "requires": { - "scoped-regex": "^2.0.0" + "debug": "^2.6.9", + "resolve": "^1.13.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "eslint-import-resolver-typescript": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.4.0.tgz", + "integrity": "sha512-useJKURidCcldRLCNKWemr1fFQL1SzB3G4a0li6lFGvlc5xGe1hY343bvG07cbpCzPuM/lK19FIJB3XGFSkplA==", "dev": true, "requires": { - "call-bind": "^1.0.2" + "debug": "^4.1.1", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" } }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "eslint-module-utils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", "dev": true, "requires": { - "has-tostringtag": "^1.0.0" + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "eslint-plugin-import": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", "dev": true, "requires": { - "has-symbols": "^1.0.1" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "devOptional": true - }, - "is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "devOptional": true, - "peer": true + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "eslint-plugin-json": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-json/-/eslint-plugin-json-2.1.2.tgz", + "integrity": "sha512-isM/fsUxS4wN1+nLsWoV5T4gLgBQnsql3nMTr8u+cEls1bL8rRQO5CP5GtxJxaOfbcKqnz401styw+H/P+e78Q==", "dev": true, "requires": { - "call-bind": "^1.0.2" + "lodash": "^4.17.19", + "vscode-json-languageservice": "^3.7.0" } }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "eslint-plugin-jsx-a11y": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz", + "integrity": "sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==", "dev": true, - "optional": true, + "peer": true, "requires": { - "is-docker": "^2.0.0" + "@babel/runtime": "^7.16.3", + "aria-query": "^4.2.2", + "array-includes": "^3.1.4", + "ast-types-flow": "^0.0.7", + "axe-core": "^4.3.5", + "axobject-query": "^2.2.0", + "damerau-levenshtein": "^1.0.7", + "emoji-regex": "^9.2.2", + "has": "^1.0.3", + "jsx-ast-utils": "^3.2.1", + "language-tags": "^1.0.5", + "minimatch": "^3.0.4" + }, + "dependencies": { + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "peer": true + } } }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "isbinaryfile": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", - "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==", - "devOptional": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true + "eslint-plugin-prettier": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz", + "integrity": "sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "eslint-plugin-react": { + "version": "7.30.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.30.0.tgz", + "integrity": "sha512-RgwH7hjW48BleKsYyHK5vUAvxtE9SMPDKmcPRQgtRCYaZA0XQPt5FSkrU3nhz5ifzMZcA8opwmRJ2cmOO8tr5A==", "dev": true, + "peer": true, "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" + "array-includes": "^3.1.5", + "array.prototype.flatmap": "^1.3.0", + "doctrine": "^2.1.0", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.5", + "object.fromentries": "^2.0.5", + "object.hasown": "^1.1.1", + "object.values": "^1.1.5", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.3", + "semver": "^6.3.0", + "string.prototype.matchall": "^4.0.7" }, "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "peer": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "peer": true + }, + "resolve": { + "version": "2.0.0-next.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", + "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", + "dev": true, + "peer": true, + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true + "dev": true, + "peer": true } } }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "eslint-plugin-react-hooks": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", + "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - } + "peer": true, + "requires": {} }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" } }, - "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "jake": { - "version": "10.8.5", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.5.tgz", - "integrity": "sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==", - "devOptional": true, + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, "requires": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.1", - "minimatch": "^3.0.4" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, - "jest": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", - "integrity": "sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==", + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "devOptional": true + }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { - "@jest/core": "^26.6.3", - "import-local": "^3.0.2", - "jest-cli": "^26.6.3" + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, - "jest-changed-files": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.2.tgz", - "integrity": "sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==", + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "@jest/types": "^26.6.2", - "execa": "^4.0.0", - "throat": "^5.0.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, - "jest-cli": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz", - "integrity": "sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==", + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "devOptional": true, + "peer": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "peer": true + }, + "exec-sh": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz", + "integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==", + "dev": true + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "requires": { - "@jest/core": "^26.6.3", - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "import-local": "^3.0.2", - "is-ci": "^2.0.0", - "jest-config": "^26.6.3", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "prompts": "^2.0.1", - "yargs": "^15.4.1" + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "dependencies": { - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "ms": "2.0.0" } }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "is-descriptor": "^0.1.0" } }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "is-extendable": "^0.1.0" } }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } - } - } - }, - "jest-config": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.3.tgz", - "integrity": "sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==", - "dev": true, - "requires": { - "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.6.3", - "@jest/types": "^26.6.2", - "babel-jest": "^26.6.3", - "chalk": "^4.0.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.6.2", - "jest-environment-node": "^26.6.2", - "jest-get-type": "^26.3.0", - "jest-jasmine2": "^26.6.3", - "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.6.2", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "micromatch": "^4.0.2", - "pretty-format": "^26.6.2" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } } }, - "jest-diff": { + "expect": { "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", - "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", + "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", "dev": true, "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^26.6.2", + "@jest/types": "^26.6.2", + "ansi-styles": "^4.0.0", "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0" } }, - "jest-docblock": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-26.0.0.tgz", - "integrity": "sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w==", + "exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { - "detect-newline": "^3.0.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" } }, - "jest-each": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.2.tgz", - "integrity": "sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==", - "dev": true, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "devOptional": true, "requires": { - "@jest/types": "^26.6.2", - "chalk": "^4.0.0", - "jest-get-type": "^26.3.0", - "jest-util": "^26.6.2", - "pretty-format": "^26.6.2" + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" } }, - "jest-environment-jsdom": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz", - "integrity": "sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==", + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, "requires": { - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2", - "jsdom": "^16.4.0" + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + } } }, - "jest-environment-node": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz", - "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==", - "dev": true, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "requires": { - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" } }, - "jest-get-type": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", - "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, - "jest-haste-map": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", - "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==", - "dev": true, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "requires": { - "@jest/types": "^26.6.2", - "@types/graceful-fs": "^4.1.2", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.1.2", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^26.0.0", - "jest-serializer": "^26.6.2", - "jest-util": "^26.6.2", - "jest-worker": "^26.6.2", - "micromatch": "^4.0.2", - "sane": "^4.0.3", - "walker": "^1.0.7" + "reusify": "^1.0.4" } }, - "jest-jasmine2": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz", - "integrity": "sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==", + "fb-watchman": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", "dev": true, "requires": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.6.2", - "@jest/source-map": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^26.6.2", - "is-generator-fn": "^2.0.0", - "jest-each": "^26.6.2", - "jest-matcher-utils": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-runtime": "^26.6.3", - "jest-snapshot": "^26.6.2", - "jest-util": "^26.6.2", - "pretty-format": "^26.6.2", - "throat": "^5.0.0" + "bser": "2.1.1" } }, - "jest-json-schema": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/jest-json-schema/-/jest-json-schema-5.0.0.tgz", - "integrity": "sha512-AggSUrNDSGndFQJAvrAHQzW9P/4tu9bnCIlvyzcOszgk8By1EU1bNP15TA38/4YekDgac49GniInpa0HsIbAjA==", - "dev": true, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "devOptional": true, "requires": { - "ajv": "^6.10.2", - "chalk": "^4.1.0", - "jest-matcher-utils": "^26.6.1" + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "devOptional": true + } } }, - "jest-leak-detector": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz", - "integrity": "sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==", + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" + "flat-cache": "^3.0.4" } }, - "jest-matcher-utils": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", - "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", - "dev": true, + "filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", "requires": { - "chalk": "^4.0.0", - "jest-diff": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" + "minimatch": "^5.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", + "requires": { + "brace-expansion": "^2.0.1" + } + } } }, - "jest-message-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", - "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", + "filing-cabinet": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/filing-cabinet/-/filing-cabinet-3.0.0.tgz", + "integrity": "sha512-o8Qac5qxZ1uVidR4Sd7ZQbbqObFZlqXU4xu1suAYg9PQPcQFNTzOmxQa/MehIDMgIvXHTb42mWPNV9l3eHBPSw==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.6.2", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "micromatch": "^4.0.2", - "pretty-format": "^26.6.2", - "slash": "^3.0.0", - "stack-utils": "^2.0.2" + "app-module-path": "^2.2.0", + "commander": "^2.20.3", + "debug": "^4.3.1", + "decomment": "^0.9.3", + "enhanced-resolve": "^5.3.2", + "is-relative-path": "^1.0.2", + "module-definition": "^3.3.1", + "module-lookup-amd": "^7.0.0", + "resolve": "^1.19.0", + "resolve-dependency-path": "^2.0.0", + "sass-lookup": "^3.0.0", + "stylus-lookup": "^3.0.1", + "typescript": "^3.9.7" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", + "dev": true + } } }, - "jest-mock": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz", - "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==", - "dev": true, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*" + "to-regex-range": "^5.0.1" } }, - "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} - }, - "jest-regex-util": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", - "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", - "dev": true + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } }, - "jest-resolve": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz", - "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==", - "dev": true, + "find-yarn-workspace-root2": { + "version": "1.2.16", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz", + "integrity": "sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==", + "devOptional": true, + "peer": true, "requires": { - "@jest/types": "^26.6.2", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^26.6.2", - "read-pkg-up": "^7.0.1", - "resolve": "^1.18.1", - "slash": "^3.0.0" + "micromatch": "^4.0.2", + "pkg-dir": "^4.2.0" }, "dependencies": { - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "devOptional": true, + "peer": true, "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "find-up": "^4.0.0" } + } + } + }, + "first-chunk-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz", + "integrity": "sha1-G97NuOCDwGZLkZRVgVd6Q6nzHXA=", + "devOptional": true, + "peer": true, + "requires": { + "readable-stream": "^2.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "devOptional": true, + "peer": true }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "devOptional": true, + "peer": true, "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "devOptional": true, + "peer": true, "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" + "safe-buffer": "~5.1.0" } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true } } }, - "jest-resolve-dependencies": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz", - "integrity": "sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==", + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "@jest/types": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-snapshot": "^26.6.2" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" } }, - "jest-runner": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz", - "integrity": "sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==", - "dev": true, - "requires": { - "@jest/console": "^26.6.2", - "@jest/environment": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.7.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-config": "^26.6.3", - "jest-docblock": "^26.0.0", - "jest-haste-map": "^26.6.2", - "jest-leak-detector": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-resolve": "^26.6.2", - "jest-runtime": "^26.6.3", - "jest-util": "^26.6.2", - "jest-worker": "^26.6.2", - "source-map-support": "^0.5.6", - "throat": "^5.0.0" - } + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true }, - "jest-runtime": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz", - "integrity": "sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==", - "dev": true, + "flatten": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", + "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "requires": { - "@jest/console": "^26.6.2", - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/globals": "^26.6.2", - "@jest/source-map": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0", - "cjs-module-lexer": "^0.6.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-config": "^26.6.3", - "jest-haste-map": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-mock": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.6.2", - "jest-snapshot": "^26.6.2", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "slash": "^3.0.0", - "strip-bom": "^4.0.0", - "yargs": "^15.4.1" + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" }, "dependencies": { - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==" } } }, - "jest-serializer": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", - "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==", + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, "requires": { - "@types/node": "*", - "graceful-fs": "^4.2.4" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" } }, - "jest-snapshot": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.2.tgz", - "integrity": "sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==", + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "dev": true, "requires": { - "@babel/types": "^7.0.0", - "@jest/types": "^26.6.2", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.0.0", - "chalk": "^4.0.0", - "expect": "^26.6.2", - "graceful-fs": "^4.2.4", - "jest-diff": "^26.6.2", - "jest-get-type": "^26.3.0", - "jest-haste-map": "^26.6.2", - "jest-matcher-utils": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-resolve": "^26.6.2", - "natural-compare": "^1.4.0", - "pretty-format": "^26.6.2", - "semver": "^7.3.2" + "map-cache": "^0.2.2" } }, - "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", - "dev": true, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" + "minipass": "^3.0.0" } }, - "jest-validate": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz", - "integrity": "sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "camelcase": "^6.0.0", - "chalk": "^4.0.0", - "jest-get-type": "^26.3.0", - "leven": "^3.1.0", - "pretty-format": "^26.6.2" - }, - "dependencies": { - "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true - } - } + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "jest-watcher": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.2.tgz", - "integrity": "sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==", + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "requires": { - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "jest-util": "^26.6.2", - "string-length": "^4.0.1" - } + "optional": true }, - "jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", "dev": true, "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" } }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, - "jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", - "dev": true, - "requires": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true - } - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true }, - "json-stringify-nice": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz", - "integrity": "sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw==", + "gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", "devOptional": true, - "peer": true + "peer": true, + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + } }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, - "jsonc-parser": { + "get-amd-module-type": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", - "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", - "devOptional": true, - "peer": true - }, - "jsonschema": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", - "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==" - }, - "jsx-ast-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.0.tgz", - "integrity": "sha512-XzO9luP6L0xkxwhIJMTJQpZo/eeN60K08jHdexfD569AGxeNug6UketeHXEhROoM8aR7EcUoOQmIhcJQjcuq8Q==", + "resolved": "https://registry.npmjs.org/get-amd-module-type/-/get-amd-module-type-3.0.0.tgz", + "integrity": "sha512-99Q7COuACPfVt18zH9N4VAMyb81S6TUgJm2NgV6ERtkh9VIkAaByZkW530wl3lLN5KTtSrK9jVLxYsoP5hQKsw==", "dev": true, - "peer": true, "requires": { - "array-includes": "^3.1.4", - "object.assign": "^4.1.2" + "ast-module-types": "^2.3.2", + "node-source-walk": "^4.0.0" } }, - "just-diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-5.2.0.tgz", - "integrity": "sha512-6ufhP9SHjb7jibNFrNxyFZ6od3g+An6Ai9mhGRvcYe8UJlH0prseN64M+6ZBBUoKYHZsitDP42gAJ8+eVWr3lw==", - "devOptional": true, - "peer": true - }, - "just-diff-apply": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.5.0.tgz", - "integrity": "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw==", - "devOptional": true, - "peer": true - }, - "just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "keyv": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.3.2.tgz", - "integrity": "sha512-kn8WmodVBe12lmHpA6W8OY7SNh6wVR+Z+wZESF4iF5FCazaVXGWOtnbnvX0tMQ1bO+/TmOD9LziuYMvrIIs0xw==", + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, "requires": { - "compress-brotli": "^1.3.8", - "json-buffer": "3.0.1" + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" } }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "get-own-enumerable-property-symbols": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", "dev": true }, - "kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", "dev": true }, - "language-subtag-registry": { - "version": "0.3.21", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz", - "integrity": "sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg==", - "dev": true, - "peer": true + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "requires": { + "pump": "^3.0.0" + } }, - "language-tags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", - "integrity": "sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==", + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, - "peer": true, "requires": { - "language-subtag-registry": "~0.3.2" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" } }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, + "github-username": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/github-username/-/github-username-6.0.0.tgz", + "integrity": "sha512-7TTrRjxblSI5l6adk9zd+cV5d6i1OrJSo3Vr9xdGqFLBQo0mz5P9eIfKCDJ7eekVGGFLbce0qbPSnktXV2BjDQ==", "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" + "@octokit/rest": "^18.0.6" } }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - } + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } }, - "load-yaml-file": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", - "integrity": "sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==", - "devOptional": true, - "peer": true, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { - "graceful-fs": "^4.1.5", - "js-yaml": "^3.13.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0" + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "13.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", + "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "devOptional": true, - "peer": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "devOptional": true, - "peer": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "devOptional": true, - "peer": true - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "devOptional": true, - "peer": true + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==" } } }, - "loader-runner": { + "gonzales-pe": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz", + "integrity": "sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==", "dev": true, - "peer": true + "requires": { + "minimist": "^1.2.5" + } }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "got": { + "version": "11.8.5", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.5.tgz", + "integrity": "sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==", "requires": { - "p-locate": "^4.1.0" + "@sindresorhus/is": "^4.0.0", + "@szmarczak/http-timer": "^4.0.5", + "@types/cacheable-request": "^6.0.1", + "@types/responselike": "^1.0.0", + "cacheable-lookup": "^5.0.3", + "cacheable-request": "^7.0.2", + "decompress-response": "^6.0.0", + "http2-wrapper": "^1.0.0-beta.5.2", + "lowercase-keys": "^2.0.0", + "p-cancelable": "^2.0.0", + "responselike": "^2.0.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true + "graphviz": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/graphviz/-/graphviz-0.0.9.tgz", + "integrity": "sha512-SmoY2pOtcikmMCqCSy2NO1YsRfu9OO0wpTlOYW++giGjfX1a6gax/m1Fo8IdUd0/3H15cTOfR1SMKwohj4LKsg==", + "dev": true, + "requires": { + "temp": "~0.4.0" + } }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true + "grouped-queue": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grouped-queue/-/grouped-queue-2.0.0.tgz", + "integrity": "sha512-/PiFUa7WIsl48dUeCvhIHnwNmAAzlI/eHoJl0vu3nsFA366JleY7Ff8EVTplZu5kO0MIdZjKTTnzItL61ahbnw==", + "devOptional": true, + "peer": true }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true, + "optional": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "devOptional": true, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" + "get-intrinsic": "^1.1.1" } }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, - "peer": true, "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" + "has-symbols": "^1.0.2" } }, - "lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, "requires": { - "yallist": "^4.0.0" + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" } }, - "madge": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/madge/-/madge-4.0.2.tgz", - "integrity": "sha512-l5bnA2dvyk0azLKDbOTCI+wDZ6nB007PhvPdmiYlPmqwVi49JPbhQrH/t4u8E6Akp3gwji1GZuA+v/F5q6yoWQ==", + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { - "chalk": "^4.1.0", - "commander": "^6.2.1", - "commondir": "^1.0.1", - "debug": "^4.0.1", - "dependency-tree": "^8.0.0", - "detective-amd": "^3.0.1", - "detective-cjs": "^3.1.1", - "detective-es6": "^2.1.0", - "detective-less": "^1.0.2", - "detective-postcss": "^4.0.0", - "detective-sass": "^3.0.1", - "detective-scss": "^2.0.1", - "detective-stylus": "^1.0.0", - "detective-typescript": "^7.0.0", - "graphviz": "0.0.9", - "ora": "^5.1.0", - "pluralize": "^8.0.0", - "precinct": "^7.0.0", - "pretty-ms": "^7.0.0", - "rc": "^1.2.7", - "typescript": "^3.9.5", - "walkdir": "^0.4.1" + "is-number": "^3.0.0", + "kind-of": "^4.0.0" }, "dependencies": { - "typescript": { - "version": "3.9.9", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", - "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", - "dev": true + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } } } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", "dev": true, "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "whatwg-encoding": "^1.0.5" } }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "make-fetch-happen": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", - "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", + "http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==" + }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "devOptional": true, - "peer": true, "requires": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" } }, - "makeerror": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", - "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", - "dev": true, + "http2-wrapper": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", "requires": { - "tmpl": "1.0.x" + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.0.0" } }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, + "humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", "requires": { - "object-visit": "^1.0.0" + "ms": "^2.0.0" } }, - "mem-fs": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/mem-fs/-/mem-fs-2.2.1.tgz", - "integrity": "sha512-yiAivd4xFOH/WXlUi6v/nKopBh1QLzwjFi36NK88cGt/PRXI8WeBASqY+YSjIVWvQTx3hR8zHKDBMV6hWmglNA==", + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "devOptional": true, - "peer": true, "requires": { - "@types/node": "^15.6.1", - "@types/vinyl": "^2.0.4", - "vinyl": "^2.0.1", - "vinyl-file": "^3.0.0" + "safer-buffer": ">= 2.1.2 < 3" } }, - "mem-fs-editor": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-9.5.0.tgz", - "integrity": "sha512-7p+bBDqsSisO20YIZf2ntYvST27fFJINn7CKE21XdPUQDcLV62b/yB5sTOooQeEoiZ3rldZQ+4RfONgL/gbRoA==", + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "devOptional": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "ignore-walk": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-4.0.1.tgz", + "integrity": "sha512-rzDQLaW4jQbh2YrOFlJdCtX8qgJTehFRYiUB2r1osqTeDzV/3+Jh8fz1oAPzUThf3iku8Ds4IDqawI5d8mUiQw==", "devOptional": true, "peer": true, "requires": { - "binaryextensions": "^4.16.0", - "commondir": "^1.0.1", - "deep-extend": "^0.6.0", - "ejs": "^3.1.8", - "globby": "^11.1.0", - "isbinaryfile": "^4.0.8", - "minimatch": "^3.1.2", - "multimatch": "^5.0.0", - "normalize-path": "^3.0.0", - "textextensions": "^5.13.0" + "minimatch": "^3.0.4" + } + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" }, "dependencies": { - "ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", - "devOptional": true, - "peer": true, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, "requires": { - "jake": "^10.8.5" + "find-up": "^4.0.0" } } } }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "devOptional": true + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" }, - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "devOptional": true, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "once": "^1.3.0", + "wrappy": "1" } }, - "mime-db": { - "version": "1.47.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", - "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, - "mime-types": { - "version": "2.1.30", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", - "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", "dev": true, "requires": { - "mime-db": "1.47.0" + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" } }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - }, - "mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" } }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" }, - "minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "devOptional": true, - "peer": true, - "requires": { - "yallist": "^4.0.0" - } + "ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "devOptional": true, - "peer": true, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, "requires": { - "minipass": "^3.0.0" + "kind-of": "^6.0.0" } }, - "minipass-fetch": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", - "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", - "devOptional": true, - "peer": true, - "requires": { - "encoding": "^0.1.12", - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" - } + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "devOptional": true, - "peer": true, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, "requires": { - "minipass": "^3.0.0" + "has-bigints": "^1.0.1" } }, - "minipass-json-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", - "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", - "devOptional": true, - "peer": true, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, "requires": { - "jsonparse": "^1.3.1", - "minipass": "^3.0.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "minipass-pipeline": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "devOptional": true, - "peer": true, - "requires": { - "minipass": "^3.0.0" - } + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true }, - "minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "devOptional": true, - "peer": true, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, "requires": { - "minipass": "^3.0.0" + "ci-info": "^2.0.0" } }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "devOptional": true, - "peer": true, + "is-core-module": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", + "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" + "has": "^1.0.3" } }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "kind-of": "^6.0.0" } }, - "mkdirp": { + "is-date-object": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "devOptional": true + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", + "dev": true }, - "mkdirp-infer-owner": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz", - "integrity": "sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw==", - "devOptional": true, - "peer": true, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, "requires": { - "chownr": "^2.0.0", - "infer-owner": "^1.0.4", - "mkdirp": "^1.0.3" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" } }, - "module-definition": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/module-definition/-/module-definition-3.3.1.tgz", - "integrity": "sha512-kLidGPwQ2yq484nSD+D3JoJp4Etc0Ox9P0L34Pu/cU4X4HcG7k7p62XI5BBuvURWMRX3RPyuhOcBHbKus+UH4A==", + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, - "requires": { - "ast-module-types": "^2.7.1", - "node-source-walk": "^4.0.0" - } + "optional": true }, - "module-lookup-amd": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/module-lookup-amd/-/module-lookup-amd-7.0.1.tgz", - "integrity": "sha512-w9mCNlj0S8qviuHzpakaLVc+/7q50jl9a/kmJ/n8bmXQZgDPkQHnPBb8MUOYh3WpAYkXuNc2c+khsozhIp/amQ==", + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "requires": { - "commander": "^2.8.1", - "debug": "^4.1.0", - "glob": "^7.1.6", - "requirejs": "^2.3.5", - "requirejs-config-file": "^4.0.0" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } + "is-plain-object": "^2.0.4" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, - "multimatch": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-5.0.0.tgz", - "integrity": "sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==", - "devOptional": true, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "requires": { - "@types/minimatch": "^3.0.3", - "array-differ": "^3.0.0", - "array-union": "^2.1.0", - "arrify": "^2.0.1", - "minimatch": "^3.0.4" + "is-extglob": "^2.1.1" } }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", "devOptional": true }, - "nanoid": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", - "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", + "is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==" + }, + "is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "has-tostringtag": "^1.0.0" } }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "is-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "devOptional": true, - "peer": true + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, - "peer": true + "requires": { + "isobject": "^3.0.1" + } }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true }, - "nise": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", - "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, - "node-fetch": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", - "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", - "requires": { - "whatwg-url": "^5.0.0" - }, - "dependencies": { - "tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - } - } + "is-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz", + "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=", + "dev": true }, - "node-gyp": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", - "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", + "is-relative-path": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-relative-path/-/is-relative-path-1.0.2.tgz", + "integrity": "sha1-CRtGoNZ8HtD+hfH4z93gBrslHUY=", + "dev": true + }, + "is-scoped": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-scoped/-/is-scoped-2.1.0.tgz", + "integrity": "sha512-Cv4OpPTHAK9kHYzkzCrof3VJh7H/PrG2MBUMvvJebaaUMbqhm0YAtXnvh0I3Hnj2tMZWwrRROWLSgfJrKqWmlQ==", "devOptional": true, "peer": true, "requires": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "dependencies": { - "are-we-there-yet": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", - "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", - "devOptional": true, - "peer": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - } - }, - "gauge": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", - "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", - "devOptional": true, - "peer": true, - "requires": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - } - }, - "npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", - "devOptional": true, - "peer": true, - "requires": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "devOptional": true, - "peer": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "devOptional": true, - "peer": true - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "devOptional": true, - "peer": true, - "requires": { - "safe-buffer": "~5.2.0" - } - } + "scoped-regex": "^2.0.0" } }, - "node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", - "dev": true - }, - "node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true - }, - "node-notifier": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz", - "integrity": "sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg==", + "is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, - "optional": true, "requires": { - "growly": "^1.3.0", - "is-wsl": "^2.2.0", - "semver": "^7.3.2", - "shellwords": "^0.1.1", - "uuid": "^8.3.0", - "which": "^2.0.2" + "call-bind": "^1.0.2" } }, - "node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", - "dev": true + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" }, - "node-source-walk": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-4.2.0.tgz", - "integrity": "sha512-hPs/QMe6zS94f5+jG3kk9E7TNm4P2SulrKiLWMzKszBfNZvL/V6wseHlTd7IvfW0NZWqPtK3+9yYNr+3USGteA==", + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, "requires": { - "@babel/parser": "^7.0.0" + "has-tostringtag": "^1.0.0" } }, - "noms": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", - "integrity": "sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=", + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", "dev": true, "requires": { - "inherits": "^2.0.1", - "readable-stream": "~1.0.31" - } - }, - "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "devOptional": true, - "peer": true, - "requires": { - "abbrev": "1" + "has-symbols": "^1.0.1" } }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "devOptional": true }, - "normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" + "is-url": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", + "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", + "dev": true }, - "npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "devOptional": true, - "peer": true, + "peer": true + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, "requires": { - "npm-normalize-package-bin": "^1.0.1" + "call-bind": "^1.0.2" } }, - "npm-install-checks": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz", - "integrity": "sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==", - "devOptional": true, - "peer": true, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "optional": true, "requires": { - "semver": "^7.1.1" + "is-docker": "^2.0.0" } }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", - "devOptional": true, - "peer": true + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true }, - "npm-package-arg": { - "version": "8.1.5", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.1.5.tgz", - "integrity": "sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q==", - "devOptional": true, - "peer": true, + "isbinaryfile": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", + "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, "requires": { - "hosted-git-info": "^4.0.1", - "semver": "^7.3.4", - "validate-npm-package-name": "^3.0.0" + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" }, "dependencies": { - "hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "devOptional": true, - "peer": true, - "requires": { - "lru-cache": "^6.0.0" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, - "npm-packlist": { + "istanbul-lib-report": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-3.0.0.tgz", - "integrity": "sha512-L/cbzmutAwII5glUcf2DBRNY/d0TFd4e/FnaZigJV6JD85RHZXJFGwCndjMWiiViiWSsWt3tiOLpI3ByTnIdFQ==", - "devOptional": true, - "peer": true, + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, "requires": { - "glob": "^7.1.6", - "ignore-walk": "^4.0.1", - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" } }, - "npm-pick-manifest": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz", - "integrity": "sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA==", - "devOptional": true, - "peer": true, + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, "requires": { - "npm-install-checks": "^4.0.0", - "npm-normalize-package-bin": "^1.0.1", - "npm-package-arg": "^8.1.2", - "semver": "^7.3.4" + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" } }, - "npm-registry-fetch": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-12.0.2.tgz", - "integrity": "sha512-Df5QT3RaJnXYuOwtXBXS9BWs+tHH2olvkCLh6jcR/b/u3DvPMlp3J0TvvYwplPKxHMOwfg287PYih9QqaVFoKA==", - "devOptional": true, - "peer": true, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, "requires": { - "make-fetch-happen": "^10.0.1", - "minipass": "^3.1.6", - "minipass-fetch": "^1.4.1", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^8.1.5" + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, + "jake": { + "version": "10.8.5", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.5.tgz", + "integrity": "sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==", + "requires": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.1", + "minimatch": "^3.0.4" + } + }, + "jest": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", + "integrity": "sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==", + "dev": true, + "requires": { + "@jest/core": "^26.6.3", + "import-local": "^3.0.2", + "jest-cli": "^26.6.3" + } + }, + "jest-changed-files": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.2.tgz", + "integrity": "sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "execa": "^4.0.0", + "throat": "^5.0.0" + } + }, + "jest-cli": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz", + "integrity": "sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==", + "dev": true, + "requires": { + "@jest/core": "^26.6.3", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "import-local": "^3.0.2", + "is-ci": "^2.0.0", + "jest-config": "^26.6.3", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "prompts": "^2.0.1", + "yargs": "^15.4.1" }, "dependencies": { - "@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", - "devOptional": true, - "peer": true, - "requires": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" - } - }, - "@npmcli/move-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", - "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", - "devOptional": true, - "peer": true, - "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - } - }, - "@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "devOptional": true, - "peer": true - }, - "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "devOptional": true, - "peer": true, - "requires": { - "balanced-match": "^1.0.0" - } - }, - "cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", - "devOptional": true, - "peer": true, - "requires": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11", - "unique-filename": "^2.0.0" - } - }, - "glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", - "devOptional": true, - "peer": true, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" } }, - "http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", - "devOptional": true, - "peer": true, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, "requires": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" } }, - "lru-cache": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", - "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", - "devOptional": true, - "peer": true - }, - "make-fetch-happen": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", - "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", - "devOptional": true, - "peer": true, - "requires": { - "agentkeepalive": "^4.2.1", - "cacache": "^16.1.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^2.0.3", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.3", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^7.0.0", - "ssri": "^9.0.0" - }, - "dependencies": { - "minipass-fetch": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", - "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", - "devOptional": true, - "peer": true, - "requires": { - "encoding": "^0.1.13", - "minipass": "^3.1.6", - "minipass-sized": "^1.0.3", - "minizlib": "^2.1.2" - } - } - } + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true }, - "minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", - "devOptional": true, - "peer": true, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, "requires": { - "brace-expansion": "^2.0.1" + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" } }, - "socks-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", - "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", - "devOptional": true, - "peer": true, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, "requires": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - } - }, - "ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", - "devOptional": true, - "peer": true, - "requires": { - "minipass": "^3.1.1" - } - }, - "unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", - "devOptional": true, - "peer": true, - "requires": { - "unique-slug": "^3.0.0" - } - }, - "unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", - "devOptional": true, - "peer": true, - "requires": { - "imurmurhash": "^0.1.4" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" } } } }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "requires": { - "path-key": "^3.0.0" - } - }, - "npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "devOptional": true, - "peer": true, - "requires": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "devOptional": true, - "peer": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "jest-config": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.3.tgz", + "integrity": "sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==", "dev": true, "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^26.6.3", + "@jest/types": "^26.6.2", + "babel-jest": "^26.6.3", + "chalk": "^4.0.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.4", + "jest-environment-jsdom": "^26.6.2", + "jest-environment-node": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-jasmine2": "^26.6.3", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2" } }, - "object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "jest-diff": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", + "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", "dev": true, "requires": { - "isobject": "^3.0.0" + "chalk": "^4.0.0", + "diff-sequences": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" } }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "jest-docblock": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-26.0.0.tgz", + "integrity": "sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" + "detect-newline": "^3.0.0" } }, - "object.entries": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", - "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", + "jest-each": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.2.tgz", + "integrity": "sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2" } }, - "object.fromentries": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", - "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", + "jest-environment-jsdom": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz", + "integrity": "sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==", "dev": true, - "peer": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2", + "jsdom": "^16.4.0" } }, - "object.hasown": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz", - "integrity": "sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==", + "jest-environment-node": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz", + "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==", "dev": true, - "peer": true, "requires": { - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" } }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "jest-get-type": { + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", + "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "dev": true + }, + "jest-haste-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", + "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==", "dev": true, "requires": { - "isobject": "^3.0.1" - } - }, - "object.values": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", - "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "@jest/types": "^26.6.2", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.1.2", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7" + } + }, + "jest-jasmine2": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz", + "integrity": "sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "@babel/traverse": "^7.1.0", + "@jest/environment": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^26.6.2", + "is-generator-fn": "^2.0.0", + "jest-each": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2", + "throat": "^5.0.0" } }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "jest-json-schema": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/jest-json-schema/-/jest-json-schema-5.0.0.tgz", + "integrity": "sha512-AggSUrNDSGndFQJAvrAHQzW9P/4tu9bnCIlvyzcOszgk8By1EU1bNP15TA38/4YekDgac49GniInpa0HsIbAjA==", + "dev": true, "requires": { - "wrappy": "1" + "ajv": "^6.10.2", + "chalk": "^4.1.0", + "jest-matcher-utils": "^26.6.1" } }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "jest-leak-detector": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz", + "integrity": "sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==", + "dev": true, "requires": { - "mimic-fn": "^2.1.0" + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" } }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "jest-matcher-utils": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", + "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", "dev": true, "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "chalk": "^4.0.0", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" } }, - "ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", - "devOptional": true, + "jest-message-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", + "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", + "dev": true, "requires": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" } }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "devOptional": true + "jest-mock": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz", + "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/node": "*" + } }, - "p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" + "jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "requires": {} }, - "p-each-series": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", - "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "jest-regex-util": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", + "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", "dev": true }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "devOptional": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "jest-resolve": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz", + "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==", + "dev": true, "requires": { - "p-limit": "^2.2.0" + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.6.2", + "read-pkg-up": "^7.0.1", + "resolve": "^1.18.1", + "slash": "^3.0.0" + }, + "dependencies": { + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } } }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "devOptional": true, - "peer": true, + "jest-resolve-dependencies": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz", + "integrity": "sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==", + "dev": true, "requires": { - "aggregate-error": "^3.0.0" + "@jest/types": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-snapshot": "^26.6.2" } }, - "p-queue": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", - "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", - "devOptional": true, - "peer": true, + "jest-runner": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz", + "integrity": "sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==", + "dev": true, "requires": { - "eventemitter3": "^4.0.4", - "p-timeout": "^3.2.0" + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.7.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-docblock": "^26.0.0", + "jest-haste-map": "^26.6.2", + "jest-leak-detector": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "source-map-support": "^0.5.6", + "throat": "^5.0.0" } }, - "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "devOptional": true, - "peer": true, + "jest-runtime": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz", + "integrity": "sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==", + "dev": true, "requires": { - "p-finally": "^1.0.0" + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/globals": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^0.6.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^15.4.1" + }, + "dependencies": { + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } } }, - "p-transform": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-transform/-/p-transform-1.3.0.tgz", - "integrity": "sha512-UJKdSzgd3KOnXXAtqN5+/eeHcvTn1hBkesEmElVgvO/NAYcxAvmjzIGmnNd3Tb/gRAvMBdNRFD4qAWdHxY6QXg==", - "devOptional": true, - "peer": true, + "jest-serializer": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", + "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==", + "dev": true, "requires": { - "debug": "^4.3.2", - "p-queue": "^6.6.2" + "@types/node": "*", + "graceful-fs": "^4.2.4" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + "jest-snapshot": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.2.tgz", + "integrity": "sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.0.0", + "chalk": "^4.0.0", + "expect": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-haste-map": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "natural-compare": "^1.4.0", + "pretty-format": "^26.6.2", + "semver": "^7.3.2" + } }, - "pacote": { - "version": "12.0.3", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-12.0.3.tgz", - "integrity": "sha512-CdYEl03JDrRO3x18uHjBYA9TyoW8gy+ThVcypcDkxPtKlw76e4ejhYB6i9lJ+/cebbjpqPW/CijjqxwDTts8Ow==", - "devOptional": true, - "peer": true, + "jest-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", + "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", + "dev": true, "requires": { - "@npmcli/git": "^2.1.0", - "@npmcli/installed-package-contents": "^1.0.6", - "@npmcli/promise-spawn": "^1.2.0", - "@npmcli/run-script": "^2.0.0", - "cacache": "^15.0.5", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "infer-owner": "^1.0.4", - "minipass": "^3.1.3", - "mkdirp": "^1.0.3", - "npm-package-arg": "^8.0.1", - "npm-packlist": "^3.0.0", - "npm-pick-manifest": "^6.0.0", - "npm-registry-fetch": "^12.0.0", - "promise-retry": "^2.0.1", - "read-package-json-fast": "^2.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.1.0" + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" } }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "jest-validate": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz", + "integrity": "sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==", "dev": true, "requires": { - "callsites": "^3.0.0" + "@jest/types": "^26.6.2", + "camelcase": "^6.0.0", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "leven": "^3.1.0", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + } } }, - "parse-conflict-json": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-2.0.2.tgz", - "integrity": "sha512-jDbRGb00TAPFsKWCpZZOT93SxVP9nONOSgES3AevqRq/CHvavEBvKAjxX9p5Y5F0RZLxH9Ufd9+RwtCsa+lFDA==", - "devOptional": true, - "peer": true, + "jest-watcher": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.2.tgz", + "integrity": "sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==", + "dev": true, "requires": { - "json-parse-even-better-errors": "^2.3.1", - "just-diff": "^5.0.1", - "just-diff-apply": "^5.2.0" + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^26.6.2", + "string-length": "^4.0.1" } }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", "dev": true, "requires": { - "error-ex": "^1.2.0" + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" } }, - "parse-ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", - "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "jsdom": { + "version": "16.7.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", + "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "dev": true, + "requires": { + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.6", + "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "acorn": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true + } + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "json-stringify-nice": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz", + "integrity": "sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw==", + "devOptional": true, + "peer": true }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==" }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "jsonschema": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", + "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==" + }, + "jsx-ast-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.0.tgz", + "integrity": "sha512-XzO9luP6L0xkxwhIJMTJQpZo/eeN60K08jHdexfD569AGxeNug6UketeHXEhROoM8aR7EcUoOQmIhcJQjcuq8Q==", "dev": true, + "peer": true, "requires": { - "isarray": "0.0.1" + "array-includes": "^3.1.4", + "object.assign": "^4.1.2" } }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "devOptional": true + "just-diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-5.2.0.tgz", + "integrity": "sha512-6ufhP9SHjb7jibNFrNxyFZ6od3g+An6Ai9mhGRvcYe8UJlH0prseN64M+6ZBBUoKYHZsitDP42gAJ8+eVWr3lw==", + "devOptional": true, + "peer": true }, - "picomatch": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", - "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", - "devOptional": true + "just-diff-apply": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/just-diff-apply/-/just-diff-apply-5.5.0.tgz", + "integrity": "sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw==", + "devOptional": true, + "peer": true }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "devOptional": true + "just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true }, - "pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "keyv": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.3.2.tgz", + "integrity": "sha512-kn8WmodVBe12lmHpA6W8OY7SNh6wVR+Z+wZESF4iF5FCazaVXGWOtnbnvX0tMQ1bO+/TmOD9LziuYMvrIIs0xw==", + "requires": { + "compress-brotli": "^1.3.8", + "json-buffer": "3.0.1" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, + "language-subtag-registry": { + "version": "0.3.21", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz", + "integrity": "sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg==", + "dev": true, + "peer": true + }, + "language-tags": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", + "integrity": "sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==", "dev": true, + "peer": true, "requires": { - "node-modules-regexp": "^1.0.0" + "language-subtag-registry": "~0.3.2" } }, - "pkg-dir": { + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + }, + "load-json-file": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { - "find-up": "^2.1.0" + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" }, "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "load-yaml-file": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz", + "integrity": "sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==", + "devOptional": true, + "peer": true, + "requires": { + "graceful-fs": "^4.1.5", + "js-yaml": "^3.13.0", + "pify": "^4.0.1", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "devOptional": true, + "peer": true, "requires": { - "p-try": "^1.0.0" + "sprintf-js": "~1.0.2" } }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "devOptional": true, + "peer": true, "requires": { - "p-limit": "^1.1.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" } }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "devOptional": true, + "peer": true }, - "path-exists": { + "strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "devOptional": true, + "peer": true } } }, - "pluralize": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", - "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "peer": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, - "postcss": { - "version": "8.2.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.14.tgz", - "integrity": "sha512-+jD0ZijcvyCqPQo/m/CW0UcARpdFylq04of+Q7RKX6f/Tu+dvpUI/9Sp81+i6/vJThnOBX09Quw0ZLOVwpzX3w==", - "dev": true, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "devOptional": true, "requires": { - "colorette": "^1.2.2", - "nanoid": "^3.1.22", - "source-map": "^0.6.1" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, - "postcss-values-parser": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz", - "integrity": "sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg==", + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, + "peer": true, "requires": { - "flatten": "^1.0.2", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" + "js-tokens": "^3.0.0 || ^4.0.0" } }, - "precinct": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/precinct/-/precinct-7.1.0.tgz", - "integrity": "sha512-I1RkW5PX51/q6Xl39//D7x9NgaKNGHpR5DCNaoxP/b2+KbzzXDNhauJUMV17KSYkJA41CSpwYUPRtRoNxbshWA==", + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==" + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "requires": { + "yallist": "^4.0.0" + } + }, + "madge": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/madge/-/madge-4.0.2.tgz", + "integrity": "sha512-l5bnA2dvyk0azLKDbOTCI+wDZ6nB007PhvPdmiYlPmqwVi49JPbhQrH/t4u8E6Akp3gwji1GZuA+v/F5q6yoWQ==", "dev": true, "requires": { - "commander": "^2.20.3", - "debug": "^4.3.1", + "chalk": "^4.1.0", + "commander": "^6.2.1", + "commondir": "^1.0.1", + "debug": "^4.0.1", + "dependency-tree": "^8.0.0", "detective-amd": "^3.0.1", "detective-cjs": "^3.1.1", - "detective-es6": "^2.2.0", + "detective-es6": "^2.1.0", "detective-less": "^1.0.2", "detective-postcss": "^4.0.0", "detective-sass": "^3.0.1", "detective-scss": "^2.0.1", "detective-stylus": "^1.0.0", - "detective-typescript": "^6.0.0", - "module-definition": "^3.3.1", - "node-source-walk": "^4.2.0" + "detective-typescript": "^7.0.0", + "graphviz": "0.0.9", + "ora": "^5.1.0", + "pluralize": "^8.0.0", + "precinct": "^7.0.0", + "pretty-ms": "^7.0.0", + "rc": "^1.2.7", + "typescript": "^3.9.5", + "walkdir": "^0.4.1" }, "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "detective-typescript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-6.0.0.tgz", - "integrity": "sha512-vTidcSDK3QostdbrH2Rwf9FhvrgJ4oIaVw5jbolgruTejexk6nNa9DShGpuS8CFVDb1IP86jct5BaZt1wSxpkA==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "^4.8.2", - "ast-module-types": "^2.7.1", - "node-source-walk": "^4.2.0", - "typescript": "^3.9.7" - } - }, "typescript": { "version": "3.9.9", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", @@ -22418,1360 +23113,927 @@ } } }, - "preferred-pm": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.0.3.tgz", - "integrity": "sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==", - "devOptional": true, - "peer": true, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, "requires": { - "find-up": "^5.0.0", - "find-yarn-workspace-root2": "1.2.16", - "path-exists": "^4.0.0", - "which-pm": "2.0.0" + "semver": "^6.0.0" }, "dependencies": { - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "devOptional": true, - "peer": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "devOptional": true, - "peer": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "devOptional": true, - "peer": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "devOptional": true, - "peer": true, - "requires": { - "p-limit": "^3.0.2" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, - "pretty-bytes": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", - "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "make-fetch-happen": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", + "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", "devOptional": true, - "peer": true - }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, + "peer": true, "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" + "agentkeepalive": "^4.1.3", + "cacache": "^15.2.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.2", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.0.0", + "ssri": "^8.0.0" } }, - "pretty-ms": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", - "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", "dev": true, "requires": { - "parse-ms": "^2.1.0" + "tmpl": "1.0.x" } }, - "proc-log": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-1.0.0.tgz", - "integrity": "sha512-aCk8AO51s+4JyuYGg3Q/a6gnrlDO09NpVWePtjp7xwphcoQ04x5WAfCyugcsbLooWcMJ87CLkD4+604IckEdhg==", - "devOptional": true, - "peer": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "devOptional": true - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", "dev": true }, - "promise-all-reject-late": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", - "integrity": "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw==", - "devOptional": true, - "peer": true - }, - "promise-call-limit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-1.0.1.tgz", - "integrity": "sha512-3+hgaa19jzCGLuSCbieeRsu5C2joKfYn8pY6JAuXFRVfF4IO+L7UPpFWNTeWT9pM7uhskvbPPd/oEOktCn317Q==", - "devOptional": true, - "peer": true - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", - "devOptional": true, - "peer": true - }, - "promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "devOptional": true, - "peer": true, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, "requires": { - "err-code": "^2.0.2", - "retry": "^0.12.0" + "object-visit": "^1.0.0" } }, - "prompts": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", - "integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==", - "dev": true, + "mem-fs": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/mem-fs/-/mem-fs-2.2.1.tgz", + "integrity": "sha512-yiAivd4xFOH/WXlUi6v/nKopBh1QLzwjFi36NK88cGt/PRXI8WeBASqY+YSjIVWvQTx3hR8zHKDBMV6hWmglNA==", + "devOptional": true, + "peer": true, "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" + "@types/node": "^15.6.1", + "@types/vinyl": "^2.0.4", + "vinyl": "^2.0.1", + "vinyl-file": "^3.0.0" } }, - "prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "peer": true, + "mem-fs-editor": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/mem-fs-editor/-/mem-fs-editor-9.5.0.tgz", + "integrity": "sha512-7p+bBDqsSisO20YIZf2ntYvST27fFJINn7CKE21XdPUQDcLV62b/yB5sTOooQeEoiZ3rldZQ+4RfONgL/gbRoA==", "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" + "binaryextensions": "^4.16.0", + "commondir": "^1.0.1", + "deep-extend": "^0.6.0", + "ejs": "^3.1.8", + "globby": "^11.1.0", + "isbinaryfile": "^4.0.8", + "minimatch": "^3.1.2", + "multimatch": "^5.0.0", + "normalize-path": "^3.0.0", + "textextensions": "^5.13.0" }, "dependencies": { - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true, - "peer": true + "ejs": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", + "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", + "requires": { + "jake": "^10.8.5" + } } } }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "braces": "^3.0.1", + "picomatch": "^2.2.3" } }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "mime-db": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", "dev": true }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "devOptional": true - }, - "quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" + "mime-types": { + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "dev": true, + "requires": { + "mime-db": "1.47.0" + } }, - "randombytes": { + "mimic-fn": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "peer": true, + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" + }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { - "safe-buffer": "^5.1.0" + "brace-expansion": "^1.1.7" } }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, + "minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" + }, + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - } + "yallist": "^4.0.0" } }, - "react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true - }, - "read-cmd-shim": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-3.0.1.tgz", - "integrity": "sha512-kEmDUoYf/CDy8yZbLTmhB1X9kkjf9Q80PCNsDMb7ufrGd6zZSQA1+UyjrO+pZm5K/S4OXCWJeiIt1JA8kAsa6g==", - "devOptional": true, - "peer": true - }, - "read-input": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/read-input/-/read-input-0.3.1.tgz", - "integrity": "sha1-WzFpMIATRk/9puyS5Y0tPOqUjfE=", - "dev": true + "minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "requires": { + "minipass": "^3.0.0" + } }, - "read-package-json-fast": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", - "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", + "minipass-fetch": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", "devOptional": true, "peer": true, "requires": { - "json-parse-even-better-errors": "^2.3.0", - "npm-normalize-package-bin": "^1.0.1" + "encoding": "^0.1.12", + "minipass": "^3.1.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.0.0" } }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, + "minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "dependencies": { - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - } + "minipass": "^3.0.0" } }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, + "minipass-json-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", + "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } + "jsonparse": "^1.3.1", + "minipass": "^3.0.0" } }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, + "minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" + "minipass": "^3.0.0" } }, - "readdir-scoped-modules": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", - "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", - "devOptional": true, - "peer": true, + "minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "requires": { - "debuglog": "^1.0.1", - "dezalgo": "^1.0.0", - "graceful-fs": "^4.1.2", - "once": "^1.3.0" + "minipass": "^3.0.0" } }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "requires": { - "resolve": "^1.1.6" + "minipass": "^3.0.0", + "yallist": "^4.0.0" } }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, - "peer": true + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + } }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "mkdirp-infer-owner": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz", + "integrity": "sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw==", + "devOptional": true, + "peer": true, "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "chownr": "^2.0.0", + "infer-owner": "^1.0.4", + "mkdirp": "^1.0.3" } }, - "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "module-definition": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/module-definition/-/module-definition-3.3.1.tgz", + "integrity": "sha512-kLidGPwQ2yq484nSD+D3JoJp4Etc0Ox9P0L34Pu/cU4X4HcG7k7p62XI5BBuvURWMRX3RPyuhOcBHbKus+UH4A==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" + "ast-module-types": "^2.7.1", + "node-source-walk": "^4.0.0" } }, - "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "devOptional": true - }, - "repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "devOptional": true, - "peer": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "requirejs": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz", - "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==", - "dev": true - }, - "requirejs-config-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/requirejs-config-file/-/requirejs-config-file-4.0.0.tgz", - "integrity": "sha512-jnIre8cbWOyvr8a5F2KuqBnY+SDA4NXr/hzEZJG79Mxm2WiFQz2dzhC8ibtPJS7zkmBEl1mxSwp5HhC1W4qpxw==", - "dev": true, - "requires": { - "esprima": "^4.0.0", - "stringify-object": "^3.2.1" - } - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "resolve-alpn": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.1.2.tgz", - "integrity": "sha512-8OyfzhAtA32LVUsJSke3auIyINcwdh5l3cvYKdKO0nvsYSKuiLfTM5i78PJswFPT8y6cPW+L1v6/hE95chcpDA==" - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "module-lookup-amd": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/module-lookup-amd/-/module-lookup-amd-7.0.1.tgz", + "integrity": "sha512-w9mCNlj0S8qviuHzpakaLVc+/7q50jl9a/kmJ/n8bmXQZgDPkQHnPBb8MUOYh3WpAYkXuNc2c+khsozhIp/amQ==", "dev": true, "requires": { - "resolve-from": "^5.0.0" + "commander": "^2.8.1", + "debug": "^4.1.0", + "glob": "^7.1.6", + "requirejs": "^2.3.5", + "requirejs-config-file": "^4.0.0" }, "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true } } }, - "resolve-dependency-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-dependency-path/-/resolve-dependency-path-2.0.0.tgz", - "integrity": "sha512-DIgu+0Dv+6v2XwRaNWnumKu7GPufBBOr5I1gRPJHkvghrfCGOooJODFvgFimX/KRxk9j0whD2MnKHzM1jYvk9w==", - "dev": true - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "responselike": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", - "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", + "multimatch": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-5.0.0.tgz", + "integrity": "sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==", "requires": { - "lowercase-keys": "^2.0.0" + "@types/minimatch": "^3.0.3", + "array-differ": "^3.0.0", + "array-union": "^2.1.0", + "arrify": "^2.0.1", + "minimatch": "^3.0.4" } }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "devOptional": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "devOptional": true }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "nanoid": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", + "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", "dev": true }, - "retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "devOptional": true, - "peer": true - }, - "reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "devOptional": true - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "devOptional": true, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, "requires": { - "glob": "^7.1.3" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" } }, - "rsvp": { - "version": "4.8.5", - "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", - "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" - }, - "run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "devOptional": true, - "requires": { - "queue-microtask": "^1.2.2" - } + "negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==" }, - "rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true, - "requires": { - "tslib": "^1.9.0" - } + "peer": true }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "devOptional": true + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "nise": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", + "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", "dev": true, "requires": { - "ret": "~0.1.10" + "@sinonjs/commons": "^1.7.0", + "@sinonjs/fake-timers": "^6.0.0", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" } }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "devOptional": true - }, - "sane": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", - "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", - "dev": true, + "node-fetch": { + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", + "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", "requires": { - "@cnakazawa/watch": "^1.0.3", - "anymatch": "^2.0.0", - "capture-exit": "^2.0.0", - "exec-sh": "^0.3.2", - "execa": "^1.0.0", - "fb-watchman": "^2.0.0", - "micromatch": "^3.1.4", - "minimist": "^1.1.1", - "walker": "~1.0.5" + "whatwg-url": "^5.0.0" }, "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, + } + } + }, + "node-gyp": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", + "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", + "devOptional": true, + "peer": true, + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^9.1.0", + "nopt": "^5.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "dependencies": { + "are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "devOptional": true, + "peer": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" } }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, + "gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "devOptional": true, + "peer": true, "requires": { - "pump": "^3.0.0" + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" } }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, + "npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "devOptional": true, + "peer": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" } }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "devOptional": true, + "peer": true, "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" } }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "devOptional": true, + "peer": true }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "devOptional": true, + "peer": true, "requires": { - "path-key": "^2.0.0" - } - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" + "safe-buffer": "~5.2.0" } } } }, - "sass-lookup": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/sass-lookup/-/sass-lookup-3.0.0.tgz", - "integrity": "sha512-TTsus8CfFRn1N44bvdEai1no6PqdmDiQUiqW5DlpmtT+tYnIt1tXtDIph5KA1efC+LmioJXSnCtUVpcK9gaKIg==", + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, + "node-notifier": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz", + "integrity": "sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg==", "dev": true, + "optional": true, "requires": { - "commander": "^2.16.0" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } + "growly": "^1.3.0", + "is-wsl": "^2.2.0", + "semver": "^7.3.2", + "shellwords": "^0.1.1", + "uuid": "^8.3.0", + "which": "^2.0.2" } }, - "saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true + }, + "node-source-walk": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/node-source-walk/-/node-source-walk-4.2.0.tgz", + "integrity": "sha512-hPs/QMe6zS94f5+jG3kk9E7TNm4P2SulrKiLWMzKszBfNZvL/V6wseHlTd7IvfW0NZWqPtK3+9yYNr+3USGteA==", "dev": true, "requires": { - "xmlchars": "^2.2.0" + "@babel/parser": "^7.0.0" } }, - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "noms": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz", + "integrity": "sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=", "dev": true, - "peer": true, "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" + "inherits": "^2.0.1", + "readable-stream": "~1.0.31" } }, - "scoped-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-2.1.0.tgz", - "integrity": "sha512-g3WxHrqSWCZHGHlSrF51VXFdjImhwvH8ZO/pryFH56Qi0cDsZfylQa/t0jCzVQFNbNvM00HfHjkDPEuarKDSWQ==", + "nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "devOptional": true, - "peer": true + "peer": true, + "requires": { + "abbrev": "1" + } }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "requires": { - "lru-cache": "^6.0.0" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } } }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + }, + "normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==" + }, + "npm-bundled": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", + "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", + "devOptional": true, "peer": true, "requires": { - "randombytes": "^2.1.0" + "npm-normalize-package-bin": "^1.0.1" } }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "devOptional": true + "npm-install-checks": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-4.0.0.tgz", + "integrity": "sha512-09OmyDkNLYwqKPOnbI8exiOZU2GVVmQp7tgez2BPi5OZC8M82elDAps7sxC4l//uSUtotWqoEIDwjRvWH4qz8w==", + "devOptional": true, + "peer": true, + "requires": { + "semver": "^7.1.1" + } }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "devOptional": true, + "peer": true + }, + "npm-package-arg": { + "version": "8.1.5", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-8.1.5.tgz", + "integrity": "sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q==", + "devOptional": true, + "peer": true, "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" + "hosted-git-info": "^4.0.1", + "semver": "^7.3.4", + "validate-npm-package-name": "^3.0.0" }, "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, + "hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "devOptional": true, + "peer": true, "requires": { - "is-extendable": "^0.1.0" + "lru-cache": "^6.0.0" } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true } } }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "npm-packlist": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-3.0.0.tgz", + "integrity": "sha512-L/cbzmutAwII5glUcf2DBRNY/d0TFd4e/FnaZigJV6JD85RHZXJFGwCndjMWiiViiWSsWt3tiOLpI3ByTnIdFQ==", + "devOptional": true, + "peer": true, "requires": { - "shebang-regex": "^3.0.0" + "glob": "^7.1.6", + "ignore-walk": "^4.0.1", + "npm-bundled": "^1.1.1", + "npm-normalize-package-bin": "^1.0.1" } }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "npm-pick-manifest": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-6.1.1.tgz", + "integrity": "sha512-dBsdBtORT84S8V8UTad1WlUyKIY9iMsAmqxHbLdeEeBNMLQDlDWWra3wYUx9EBEIiG/YwAy0XyNHDd2goAsfuA==", + "devOptional": true, + "peer": true, "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" + "npm-install-checks": "^4.0.0", + "npm-normalize-package-bin": "^1.0.1", + "npm-package-arg": "^8.1.2", + "semver": "^7.3.4" } }, - "shellwords": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", - "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", - "dev": true, - "optional": true - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "sinon": { - "version": "9.2.4", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", - "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.8.1", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/samsam": "^5.3.1", - "diff": "^4.0.2", - "nise": "^4.0.4", - "supports-color": "^7.1.0" - } - }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "devOptional": true - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, - "smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "npm-registry-fetch": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-12.0.2.tgz", + "integrity": "sha512-Df5QT3RaJnXYuOwtXBXS9BWs+tHH2olvkCLh6jcR/b/u3DvPMlp3J0TvvYwplPKxHMOwfg287PYih9QqaVFoKA==", "devOptional": true, - "peer": true - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, + "peer": true, "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "make-fetch-happen": "^10.0.1", + "minipass": "^3.1.6", + "minipass-fetch": "^1.4.1", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^8.1.5" }, "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "devOptional": true, + "peer": true, "requires": { - "ms": "2.0.0" + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" } }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, + "@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "devOptional": true, + "peer": true, "requires": { - "is-descriptor": "^0.1.0" + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" } }, - "extend-shallow": { + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "devOptional": true, + "peer": true + }, + "brace-expansion": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "devOptional": true, + "peer": true, "requires": { - "is-extendable": "^0.1.0" + "balanced-match": "^1.0.0" } }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, + "cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "devOptional": true, + "peer": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" } }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "devOptional": true, + "peer": true, "requires": { - "kind-of": "^3.0.2" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "devOptional": true, + "peer": true, + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "devOptional": true, + "peer": true + }, + "make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "devOptional": true, + "peer": true, + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, + "minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", + "devOptional": true, + "peer": true, "requires": { - "is-buffer": "^1.1.5" + "encoding": "^0.1.13", + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" } } } }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "minimatch": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", + "devOptional": true, + "peer": true, + "requires": { + "brace-expansion": "^2.0.1" } }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true + "socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "devOptional": true, + "peer": true, + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "devOptional": true, + "peer": true, + "requires": { + "minipass": "^3.1.1" + } }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, + "unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "devOptional": true, + "peer": true, "requires": { - "is-descriptor": "^1.0.0" + "unique-slug": "^3.0.0" } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, + }, + "unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "devOptional": true, + "peer": true, "requires": { - "is-buffer": "^1.1.5" + "imurmurhash": "^0.1.4" } } } }, - "socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "devOptional": true, - "peer": true, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "requires": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" + "path-key": "^3.0.0" } }, - "socks-proxy-agent": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", - "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", + "npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", "devOptional": true, "peer": true, "requires": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - } - }, - "sort-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-4.2.0.tgz", - "integrity": "sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg==", - "requires": { - "is-plain-obj": "^2.0.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" } }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", "dev": true }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", - "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==" - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "devOptional": true - }, - "ssri": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", - "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "devOptional": true, - "peer": true, - "requires": { - "minipass": "^3.1.1" - } - }, - "stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", - "dev": true, - "requires": { - "escape-string-regexp": "^2.0.0" - } + "peer": true }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "dev": true, "requires": { + "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", - "object-copy": "^0.1.0" + "kind-of": "^3.0.3" }, "dependencies": { "define-property": { @@ -23790,17 +24052,6 @@ "dev": true, "requires": { "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } } }, "is-data-descriptor": { @@ -23810,17 +24061,6 @@ "dev": true, "requires": { "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } } }, "is-descriptor": { @@ -23832,1232 +24072,3649 @@ "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } } }, "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } } } }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "object-inspect": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true }, - "string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, "requires": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" + "isobject": "^3.0.0" } }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "devOptional": true, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" } }, - "string.prototype.matchall": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz", - "integrity": "sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==", + "object.entries": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz", + "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==", "dev": true, - "peer": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.19.1", - "get-intrinsic": "^1.1.1", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "regexp.prototype.flags": "^1.4.1", - "side-channel": "^1.0.4" + "es-abstract": "^1.19.1" } }, - "string.prototype.trimend": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", - "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "object.fromentries": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", + "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", "dev": true, + "peer": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "es-abstract": "^1.19.5" + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" } }, - "string.prototype.trimstart": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", - "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "object.hasown": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.1.tgz", + "integrity": "sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==", "dev": true, + "peer": true, "requires": { - "call-bind": "^1.0.2", "define-properties": "^1.1.4", "es-abstract": "^1.19.5" } }, - "stringify-object": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", - "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "dev": true, "requires": { - "get-own-enumerable-property-symbols": "^3.0.0", - "is-obj": "^1.0.1", - "is-regexp": "^1.0.0" + "isobject": "^3.0.1" } }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "devOptional": true, + "object.values": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "dev": true, "requires": { - "ansi-regex": "^5.0.1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1" } }, - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, - "strip-bom-buf": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", - "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", - "devOptional": true, - "peer": true, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "is-utf8": "^0.2.1" + "wrappy": "1" } }, - "strip-bom-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", - "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", - "devOptional": true, - "peer": true, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "requires": { - "first-chunk-stream": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "devOptional": true, - "peer": true, - "requires": { - "is-utf8": "^0.2.0" - } - } + "mimic-fn": "^2.1.0" } }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "stylus-lookup": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/stylus-lookup/-/stylus-lookup-3.0.2.tgz", - "integrity": "sha512-oEQGHSjg/AMaWlKe7gqsnYzan8DLcGIHe0dUaFkucZZ14z4zjENRlQMCHT4FNsiWnJf17YN9OvrCfCoi7VvOyg==", + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "commander": "^2.8.1", - "debug": "^4.1.0" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { - "has-flag": "^4.0.0" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, - "supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", - "dev": true, + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "devOptional": true, "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" } }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "peer": true + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "devOptional": true }, - "symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "p-cancelable": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" + }, + "p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", "dev": true }, - "syntax-error": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", - "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", - "dev": true, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "devOptional": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "requires": { - "acorn-node": "^1.2.0" + "p-try": "^2.0.0" } }, - "table": { - "version": "6.7.0", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.0.tgz", - "integrity": "sha512-SAM+5p6V99gYiiy2gT5ArdzgM1dLDed0nkrWmG6Fry/bUS/m9x83BwpJUOf1Qj/x2qJd+thL6IkIx7qPGRxqBw==", - "dev": true, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "requires": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ajv": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.2.0.tgz", - "integrity": "sha512-WSNGFuyWd//XO8n/m/EaOlNLtO0yL8EXT/74LqT4khdhpZjP7lkj/kT5uwRmGitKEVp/Oj7ZUHeGfPtgHhQ5CA==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - } + "p-limit": "^2.2.0" } }, - "tapable": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", - "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", - "dev": true + "p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "requires": { + "aggregate-error": "^3.0.0" + } }, - "tar": { - "version": "6.1.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", - "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "p-queue": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", + "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", "devOptional": true, "peer": true, "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "dependencies": { - "minipass": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", - "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", - "devOptional": true, - "peer": true, - "requires": { - "yallist": "^4.0.0" - } - } + "eventemitter3": "^4.0.4", + "p-timeout": "^3.2.0" } }, - "temp": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.4.0.tgz", - "integrity": "sha1-ZxrWPVe+D+nXKUZks/xABjZnimA=", - "dev": true - }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, + "p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "devOptional": true, + "peer": true, "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" + "p-finally": "^1.0.0" } }, - "terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", - "dev": true, + "p-transform": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-transform/-/p-transform-1.3.0.tgz", + "integrity": "sha512-UJKdSzgd3KOnXXAtqN5+/eeHcvTn1hBkesEmElVgvO/NAYcxAvmjzIGmnNd3Tb/gRAvMBdNRFD4qAWdHxY6QXg==", + "devOptional": true, "peer": true, "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "dependencies": { - "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", - "dev": true, - "peer": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "peer": true - } + "debug": "^4.3.2", + "p-queue": "^6.6.2" } }, - "terser-webpack-plugin": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", - "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", - "dev": true, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "pacote": { + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-12.0.3.tgz", + "integrity": "sha512-CdYEl03JDrRO3x18uHjBYA9TyoW8gy+ThVcypcDkxPtKlw76e4ejhYB6i9lJ+/cebbjpqPW/CijjqxwDTts8Ow==", + "devOptional": true, "peer": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.7", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.7.2" - }, - "dependencies": { - "jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "peer": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "peer": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "@npmcli/git": "^2.1.0", + "@npmcli/installed-package-contents": "^1.0.6", + "@npmcli/promise-spawn": "^1.2.0", + "@npmcli/run-script": "^2.0.0", + "cacache": "^15.0.5", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "infer-owner": "^1.0.4", + "minipass": "^3.1.3", + "mkdirp": "^1.0.3", + "npm-package-arg": "^8.0.1", + "npm-packlist": "^3.0.0", + "npm-pick-manifest": "^6.0.0", + "npm-registry-fetch": "^12.0.0", + "promise-retry": "^2.0.1", + "read-package-json-fast": "^2.0.1", + "rimraf": "^3.0.2", + "ssri": "^8.0.1", + "tar": "^6.1.0" } }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "callsites": "^3.0.0" } }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" - }, - "textextensions": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-5.15.0.tgz", - "integrity": "sha512-MeqZRHLuaGamUXGuVn2ivtU3LA3mLCCIO5kUGoohTCoGmCBg/+8yPhWVX9WSl9telvVd8erftjFk9Fwb2dD6rw==", - "devOptional": true, - "peer": true - }, - "throat": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", - "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "devOptional": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, + "parse-conflict-json": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-2.0.2.tgz", + "integrity": "sha512-jDbRGb00TAPFsKWCpZZOT93SxVP9nONOSgES3AevqRq/CHvavEBvKAjxX9p5Y5F0RZLxH9Ufd9+RwtCsa+lFDA==", + "devOptional": true, + "peer": true, "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } + "json-parse-even-better-errors": "^2.3.1", + "just-diff": "^5.0.1", + "just-diff-apply": "^5.2.0" } }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "devOptional": true, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, "requires": { - "os-tmpdir": "~1.0.2" + "error-ex": "^1.2.0" } }, - "tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "parse-ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", + "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", "dev": true }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", "dev": true }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", "requires": { - "kind-of": "^3.0.2" + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } + "lru-cache": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.1.0.tgz", + "integrity": "sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==" + }, + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" } } }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", "dev": true, "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, - "requires": { - "is-number": "^7.0.0" + "isarray": "0.0.1" } }, - "tough-cookie": { + "path-type": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", - "dev": true, - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - } - }, - "tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "dev": true, - "requires": { - "punycode": "^2.1.1" - } - }, - "treeverse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-1.0.4.tgz", - "integrity": "sha512-whw60l7r+8ZU8Tu/Uc2yxtc4ZTZbR/PF3u1IPNKGQ6p8EICLb3Z2lAgoqw9bqYd8IkgnsaOcLzYHFckjqNsf0g==", - "devOptional": true, - "peer": true + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, - "ts-jest": { - "version": "26.5.6", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.6.tgz", - "integrity": "sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA==", - "dev": true, - "requires": { - "bs-logger": "0.x", - "buffer-from": "1.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^26.1.0", - "json5": "2.x", - "lodash": "4.x", - "make-error": "1.x", - "mkdirp": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" - } + "picomatch": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==" }, - "ts-loader": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.1.2.tgz", - "integrity": "sha512-ryMgATvLLl+z8zQvdlm6Pep0slmwxFWIEnq/5VdiLVjqQXnFJgO+qNLGIIP+d2N2jsFZ9MibZCVDb2bSp7OmEA==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4" - } + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "devOptional": true }, - "ts-node": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", - "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", "dev": true, "requires": { - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "source-map-support": "^0.5.17", - "yn": "3.1.1" + "node-modules-regexp": "^1.0.0" } }, - "tsconfig-paths": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "dev": true, "requires": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", - "minimist": "^1.2.0", - "strip-bom": "^3.0.0" + "find-up": "^2.1.0" }, "dependencies": { - "json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { - "minimist": "^1.2.0" + "locate-path": "^2.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true } } }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "postcss": { + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.14.tgz", + "integrity": "sha512-+jD0ZijcvyCqPQo/m/CW0UcARpdFylq04of+Q7RKX6f/Tu+dvpUI/9Sp81+i6/vJThnOBX09Quw0ZLOVwpzX3w==", "dev": true, "requires": { - "is-typedarray": "^1.0.0" + "colorette": "^1.2.2", + "nanoid": "^3.1.22", + "source-map": "^0.6.1" } }, - "typescript": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", - "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", - "dev": true - }, - "unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "postcss-values-parser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz", + "integrity": "sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" } }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "precinct": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/precinct/-/precinct-7.1.0.tgz", + "integrity": "sha512-I1RkW5PX51/q6Xl39//D7x9NgaKNGHpR5DCNaoxP/b2+KbzzXDNhauJUMV17KSYkJA41CSpwYUPRtRoNxbshWA==", "dev": true, "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" + "commander": "^2.20.3", + "debug": "^4.3.1", + "detective-amd": "^3.0.1", + "detective-cjs": "^3.1.1", + "detective-es6": "^2.2.0", + "detective-less": "^1.0.2", + "detective-postcss": "^4.0.0", + "detective-sass": "^3.0.1", + "detective-scss": "^2.0.1", + "detective-stylus": "^1.0.0", + "detective-typescript": "^6.0.0", + "module-definition": "^3.3.1", + "node-source-walk": "^4.2.0" }, "dependencies": { - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "detective-typescript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/detective-typescript/-/detective-typescript-6.0.0.tgz", + "integrity": "sha512-vTidcSDK3QostdbrH2Rwf9FhvrgJ4oIaVw5jbolgruTejexk6nNa9DShGpuS8CFVDb1IP86jct5BaZt1wSxpkA==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "^4.8.2", + "ast-module-types": "^2.7.1", + "node-source-walk": "^4.2.0", + "typescript": "^3.9.7" + } + }, + "typescript": { + "version": "3.9.9", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz", + "integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==", "dev": true } } }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "devOptional": true, - "peer": true, - "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "preferred-pm": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.0.3.tgz", + "integrity": "sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==", "devOptional": true, "peer": true, "requires": { - "imurmurhash": "^0.1.4" - } - }, - "universal-user-agent": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" + "find-up": "^5.0.0", + "find-yarn-workspace-root2": "1.2.16", + "path-exists": "^4.0.0", + "which-pm": "2.0.0" }, "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "devOptional": true, + "peer": true, "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" } }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "devOptional": true, + "peer": true, + "requires": { + "p-locate": "^5.0.0" + } }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "devOptional": true, + "peer": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "devOptional": true, + "peer": true, + "requires": { + "p-limit": "^3.0.2" + } } } }, - "untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "devOptional": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "prettier": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", "dev": true }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "devOptional": true - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", "dev": true, - "optional": true + "requires": { + "fast-diff": "^1.1.2" + } }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true + "pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "devOptional": true, + "peer": true }, - "v8-to-istanbul": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", - "integrity": "sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==", + "pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", "dev": true, "requires": { - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - } + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" } }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "pretty-ms": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", + "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", + "dev": true, "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" + "parse-ms": "^2.1.0" } }, - "validate-npm-package-name": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==", + "proc-log": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-1.0.0.tgz", + "integrity": "sha512-aCk8AO51s+4JyuYGg3Q/a6gnrlDO09NpVWePtjp7xwphcoQ04x5WAfCyugcsbLooWcMJ87CLkD4+604IckEdhg==", "devOptional": true, - "peer": true, - "requires": { - "builtins": "^1.0.3" - } + "peer": true }, - "vinyl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", - "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "devOptional": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise-all-reject-late": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz", + "integrity": "sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw==", "devOptional": true, - "peer": true, - "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - } + "peer": true }, - "vinyl-file": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-3.0.0.tgz", - "integrity": "sha1-sQTZ5ECf+jJfqt1SBkLQo7SIs2U=", + "promise-call-limit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-call-limit/-/promise-call-limit-1.0.1.tgz", + "integrity": "sha512-3+hgaa19jzCGLuSCbieeRsu5C2joKfYn8pY6JAuXFRVfF4IO+L7UPpFWNTeWT9pM7uhskvbPPd/oEOktCn317Q==", "devOptional": true, - "peer": true, + "peer": true + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==" + }, + "promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.3.0", - "strip-bom-buf": "^1.0.0", - "strip-bom-stream": "^2.0.0", - "vinyl": "^2.0.1" + "err-code": "^2.0.2", + "retry": "^0.12.0" } }, - "vscode-json-languageservice": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-3.11.0.tgz", - "integrity": "sha512-QxI+qV97uD7HHOCjh3MrM1TfbdwmTXrMckri5Tus1/FQiG3baDZb2C9Y0y8QThs7PwHYBIQXcAc59ZveCRZKPA==", + "prompts": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", + "integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==", "dev": true, "requires": { - "jsonc-parser": "^3.0.0", - "vscode-languageserver-textdocument": "^1.0.1", - "vscode-languageserver-types": "3.16.0-next.2", - "vscode-nls": "^5.0.0", - "vscode-uri": "^2.1.2" + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" } }, - "vscode-languageserver-textdocument": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz", - "integrity": "sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA==", - "dev": true + "prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dev": true, + "peer": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true, + "peer": true + } + } }, - "vscode-languageserver-types": { - "version": "3.16.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0-next.2.tgz", - "integrity": "sha512-QjXB7CKIfFzKbiCJC4OWC8xUncLsxo19FzGVp/ADFvvi87PlmBSCAtZI5xwGjF5qE0xkLf0jjKUn3DzmpDP52Q==", + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, - "vscode-nls": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.0.0.tgz", - "integrity": "sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA==", - "dev": true + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } }, - "vscode-uri": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.2.tgz", - "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==", + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, - "w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" + }, + "quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==" + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "peer": true, "requires": { - "browser-process-hrtime": "^1.0.0" + "safe-buffer": "^5.1.0" } }, - "w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { - "xml-name-validator": "^3.0.0" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } } }, - "walk-up-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz", - "integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==", + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "read-cmd-shim": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-3.0.1.tgz", + "integrity": "sha512-kEmDUoYf/CDy8yZbLTmhB1X9kkjf9Q80PCNsDMb7ufrGd6zZSQA1+UyjrO+pZm5K/S4OXCWJeiIt1JA8kAsa6g==", "devOptional": true, "peer": true }, - "walkdir": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.4.1.tgz", - "integrity": "sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ==", + "read-input": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/read-input/-/read-input-0.3.1.tgz", + "integrity": "sha1-WzFpMIATRk/9puyS5Y0tPOqUjfE=", "dev": true }, - "walker": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", - "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", - "dev": true, - "requires": { - "makeerror": "1.0.x" - } - }, - "watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", - "dev": true, - "peer": true, + "read-package-json": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.4.tgz", + "integrity": "sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw==", "requires": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" + "glob": "^10.2.2", + "json-parse-even-better-errors": "^3.0.0", + "normalize-package-data": "^5.0.0", + "npm-normalize-package-bin": "^3.0.0" }, "dependencies": { - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "peer": true + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + } + }, + "hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "requires": { + "lru-cache": "^7.5.1" + } + }, + "json-parse-even-better-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==" + }, + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==" + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + }, + "normalize-package-data": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz", + "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==", + "requires": { + "hosted-git-info": "^6.0.0", + "is-core-module": "^2.8.1", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + } + }, + "npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==" } } }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "read-package-json-fast": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", + "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", "devOptional": true, + "peer": true, "requires": { - "defaults": "^1.0.3" + "json-parse-even-better-errors": "^2.3.0", + "npm-normalize-package-bin": "^1.0.1" } }, - "webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "dev": true + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + }, + "dependencies": { + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + } + } }, - "webpack": { - "version": "5.73.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz", - "integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==", + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, - "peer": true, "requires": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.9.3", - "es-module-lexer": "^0.9.0", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.3.1", - "webpack-sources": "^3.2.3" + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" }, "dependencies": { - "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, - "peer": true + "requires": { + "locate-path": "^2.0.0" + } }, - "acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, - "peer": true, - "requires": {} + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, - "peer": true + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true } } }, - "webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "peer": true - }, - "whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", "dev": true, "requires": { - "iconv-lite": "0.4.24" + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" } }, - "whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true - }, - "whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", - "dev": true, + "readdir-scoped-modules": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", + "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", + "devOptional": true, + "peer": true, "requires": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" } }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "requires": { - "isexe": "^2.0.0" + "resolve": "^1.1.6" } }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true + "peer": true }, - "which-pm": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.0.0.tgz", - "integrity": "sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==", - "devOptional": true, - "peer": true, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, "requires": { - "load-yaml-file": "^0.2.0", - "path-exists": "^4.0.0" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" } }, - "wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "devOptional": true, - "peer": true, + "regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", + "dev": true, "requires": { - "string-width": "^1.0.2 || 2 || 3 || 4" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" } }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "devOptional": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "devOptional": true }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true }, - "ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", - "dev": true, - "requires": {} + "replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "devOptional": true, + "peer": true }, - "xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "requirejs": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz", + "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==", "dev": true }, - "yallist": { + "requirejs-config-file": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "resolved": "https://registry.npmjs.org/requirejs-config-file/-/requirejs-config-file-4.0.0.tgz", + "integrity": "sha512-jnIre8cbWOyvr8a5F2KuqBnY+SDA4NXr/hzEZJG79Mxm2WiFQz2dzhC8ibtPJS7zkmBEl1mxSwp5HhC1W4qpxw==", + "dev": true, + "requires": { + "esprima": "^4.0.0", + "stringify-object": "^3.2.1" + } }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-alpn": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.1.2.tgz", + "integrity": "sha512-8OyfzhAtA32LVUsJSke3auIyINcwdh5l3cvYKdKO0nvsYSKuiLfTM5i78PJswFPT8y6cPW+L1v6/hE95chcpDA==" + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } } }, - "yargs-parser": { - "version": "20.2.7", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", - "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "resolve-dependency-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-dependency-path/-/resolve-dependency-path-2.0.0.tgz", + "integrity": "sha512-DIgu+0Dv+6v2XwRaNWnumKu7GPufBBOr5I1gRPJHkvghrfCGOooJODFvgFimX/KRxk9j0whD2MnKHzM1jYvk9w==", "dev": true }, - "yeoman-environment": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-3.13.0.tgz", - "integrity": "sha512-eBPpBZCvFzx6yk17x+ZrOHp8ADDv6qHradV+SgdugaQKIy9NjEX5AkbwdTHLOgccSTkQ9rN791xvYOu6OmqjBg==", - "devOptional": true, - "peer": true, - "requires": { + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "responselike": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz", + "integrity": "sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw==", + "requires": { + "lowercase-keys": "^2.0.0" + } + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "devOptional": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==" + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "requires": { + "glob": "^7.1.3" + } + }, + "rsvp": { + "version": "4.8.5", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", + "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", + "dev": true + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" + }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } + }, + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "devOptional": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "devOptional": true + }, + "sane": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", + "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", + "dev": true, + "requires": { + "@cnakazawa/watch": "^1.0.3", + "anymatch": "^2.0.0", + "capture-exit": "^2.0.0", + "exec-sh": "^0.3.2", + "execa": "^1.0.0", + "fb-watchman": "^2.0.0", + "micromatch": "^3.1.4", + "minimist": "^1.1.1", + "walker": "~1.0.5" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "sass-lookup": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/sass-lookup/-/sass-lookup-3.0.0.tgz", + "integrity": "sha512-TTsus8CfFRn1N44bvdEai1no6PqdmDiQUiqW5DlpmtT+tYnIt1tXtDIph5KA1efC+LmioJXSnCtUVpcK9gaKIg==", + "dev": true, + "requires": { + "commander": "^2.16.0" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, + "saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "requires": { + "xmlchars": "^2.2.0" + } + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "peer": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "scoped-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/scoped-regex/-/scoped-regex-2.1.0.tgz", + "integrity": "sha512-g3WxHrqSWCZHGHlSrF51VXFdjImhwvH8ZO/pryFH56Qi0cDsZfylQa/t0jCzVQFNbNvM00HfHjkDPEuarKDSWQ==", + "devOptional": true, + "peer": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "peer": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + } + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true, + "optional": true + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "sigstore": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/sigstore/-/sigstore-1.9.0.tgz", + "integrity": "sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A==", + "requires": { + "@sigstore/bundle": "^1.1.0", + "@sigstore/protobuf-specs": "^0.2.0", + "@sigstore/sign": "^1.0.0", + "@sigstore/tuf": "^1.0.3", + "make-fetch-happen": "^11.0.1" + }, + "dependencies": { + "@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "requires": { + "semver": "^7.3.5" + } + }, + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "requires": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "requires": { + "minipass": "^7.0.3" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==" + }, + "make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + } + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==" + }, + "minipass-fetch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "requires": { + "encoding": "^0.1.13", + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } + }, + "ssri": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "requires": { + "minipass": "^7.0.3" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "requires": { + "unique-slug": "^4.0.0" + } + }, + "unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "requires": { + "imurmurhash": "^0.1.4" + } + } + } + }, + "sinon": { + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", + "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.8.1", + "@sinonjs/fake-timers": "^6.0.1", + "@sinonjs/samsam": "^5.3.1", + "diff": "^4.0.2", + "nise": "^4.0.4", + "supports-color": "^7.1.0" + } + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, + "smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "requires": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + } + }, + "socks-proxy-agent": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", + "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", + "devOptional": true, + "peer": true, + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } + }, + "sort-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-4.2.0.tgz", + "integrity": "sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg==", + "requires": { + "is-plain-obj": "^2.0.0" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==" + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "devOptional": true + }, + "ssri": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "devOptional": true, + "peer": true, + "requires": { + "minipass": "^3.1.1" + } + }, + "stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string.prototype.matchall": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz", + "integrity": "sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==", + "dev": true, + "peer": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1", + "get-intrinsic": "^1.1.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.3", + "regexp.prototype.flags": "^1.4.1", + "side-channel": "^1.0.4" + } + }, + "string.prototype.trimend": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz", + "integrity": "sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz", + "integrity": "sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.19.5" + } + }, + "stringify-object": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", + "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==", + "dev": true, + "requires": { + "get-own-enumerable-property-symbols": "^3.0.0", + "is-obj": "^1.0.1", + "is-regexp": "^1.0.0" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "strip-bom-buf": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", + "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", + "devOptional": true, + "peer": true, + "requires": { + "is-utf8": "^0.2.1" + } + }, + "strip-bom-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-stream/-/strip-bom-stream-2.0.0.tgz", + "integrity": "sha1-+H217yYT9paKpUWr/h7HKLaoKco=", + "devOptional": true, + "peer": true, + "requires": { + "first-chunk-stream": "^2.0.0", + "strip-bom": "^2.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "devOptional": true, + "peer": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "stylus-lookup": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/stylus-lookup/-/stylus-lookup-3.0.2.tgz", + "integrity": "sha512-oEQGHSjg/AMaWlKe7gqsnYzan8DLcGIHe0dUaFkucZZ14z4zjENRlQMCHT4FNsiWnJf17YN9OvrCfCoi7VvOyg==", + "dev": true, + "requires": { + "commander": "^2.8.1", + "debug": "^4.1.0" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "peer": true + }, + "symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "dev": true, + "requires": { + "acorn-node": "^1.2.0" + } + }, + "table": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.0.tgz", + "integrity": "sha512-SAM+5p6V99gYiiy2gT5ArdzgM1dLDed0nkrWmG6Fry/bUS/m9x83BwpJUOf1Qj/x2qJd+thL6IkIx7qPGRxqBw==", + "dev": true, + "requires": { + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.2.0.tgz", + "integrity": "sha512-WSNGFuyWd//XO8n/m/EaOlNLtO0yL8EXT/74LqT4khdhpZjP7lkj/kT5uwRmGitKEVp/Oj7ZUHeGfPtgHhQ5CA==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, + "tapable": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", + "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", + "dev": true + }, + "tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "requires": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^4.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "dependencies": { + "minipass": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", + "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", + "requires": { + "yallist": "^4.0.0" + } + } + } + }, + "temp": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.4.0.tgz", + "integrity": "sha1-ZxrWPVe+D+nXKUZks/xABjZnimA=", + "dev": true + }, + "terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + } + }, + "terser": { + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", + "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "dependencies": { + "acorn": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "dev": true, + "peer": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "peer": true + } + } + }, + "terser-webpack-plugin": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", + "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.7", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.7.2" + }, + "dependencies": { + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "peer": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "peer": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, + "textextensions": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-5.15.0.tgz", + "integrity": "sha512-MeqZRHLuaGamUXGuVn2ivtU3LA3mLCCIO5kUGoohTCoGmCBg/+8yPhWVX9WSl9telvVd8erftjFk9Fwb2dD6rw==" + }, + "throat": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", + "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "devOptional": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "devOptional": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + }, + "tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "dev": true, + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + } + }, + "tr46": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "dev": true, + "requires": { + "punycode": "^2.1.1" + } + }, + "treeverse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-1.0.4.tgz", + "integrity": "sha512-whw60l7r+8ZU8Tu/Uc2yxtc4ZTZbR/PF3u1IPNKGQ6p8EICLb3Z2lAgoqw9bqYd8IkgnsaOcLzYHFckjqNsf0g==", + "devOptional": true, + "peer": true + }, + "ts-jest": { + "version": "26.5.6", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.6.tgz", + "integrity": "sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA==", + "dev": true, + "requires": { + "bs-logger": "0.x", + "buffer-from": "1.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^26.1.0", + "json5": "2.x", + "lodash": "4.x", + "make-error": "1.x", + "mkdirp": "1.x", + "semver": "7.x", + "yargs-parser": "20.x" + } + }, + "ts-loader": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.1.2.tgz", + "integrity": "sha512-ryMgATvLLl+z8zQvdlm6Pep0slmwxFWIEnq/5VdiLVjqQXnFJgO+qNLGIIP+d2N2jsFZ9MibZCVDb2bSp7OmEA==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4" + } + }, + "ts-node": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", + "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + } + }, + "tsconfig-paths": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", + "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + } + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "tuf-js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", + "integrity": "sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg==", + "requires": { + "@tufjs/models": "1.0.4", + "debug": "^4.3.4", + "make-fetch-happen": "^11.1.1" + }, + "dependencies": { + "@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "requires": { + "semver": "^7.3.5" + } + }, + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "requires": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "requires": { + "minipass": "^7.0.3" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==" + }, + "make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + } + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==" + }, + "minipass-fetch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "requires": { + "encoding": "^0.1.13", + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } + }, + "ssri": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "requires": { + "minipass": "^7.0.3" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "requires": { + "unique-slug": "^4.0.0" + } + }, + "unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "requires": { + "imurmurhash": "^0.1.4" + } + } + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "typescript": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", + "dev": true + }, + "unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + } + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + } + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "devOptional": true, + "peer": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "devOptional": true, + "peer": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "devOptional": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "optional": true + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "v8-to-istanbul": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", + "integrity": "sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==", + "devOptional": true, + "peer": true, + "requires": { + "builtins": "^1.0.3" + } + }, + "vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "devOptional": true, + "peer": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "vinyl-file": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/vinyl-file/-/vinyl-file-3.0.0.tgz", + "integrity": "sha1-sQTZ5ECf+jJfqt1SBkLQo7SIs2U=", + "devOptional": true, + "peer": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.3.0", + "strip-bom-buf": "^1.0.0", + "strip-bom-stream": "^2.0.0", + "vinyl": "^2.0.1" + } + }, + "vscode-json-languageservice": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-3.11.0.tgz", + "integrity": "sha512-QxI+qV97uD7HHOCjh3MrM1TfbdwmTXrMckri5Tus1/FQiG3baDZb2C9Y0y8QThs7PwHYBIQXcAc59ZveCRZKPA==", + "dev": true, + "requires": { + "jsonc-parser": "^3.0.0", + "vscode-languageserver-textdocument": "^1.0.1", + "vscode-languageserver-types": "3.16.0-next.2", + "vscode-nls": "^5.0.0", + "vscode-uri": "^2.1.2" + } + }, + "vscode-languageserver-textdocument": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz", + "integrity": "sha512-UIcJDjX7IFkck7cSkNNyzIz5FyvpQfY7sdzVy+wkKN/BLaD4DQ0ppXQrKePomCxTS7RrolK1I0pey0bG9eh8dA==", + "dev": true + }, + "vscode-languageserver-types": { + "version": "3.16.0-next.2", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0-next.2.tgz", + "integrity": "sha512-QjXB7CKIfFzKbiCJC4OWC8xUncLsxo19FzGVp/ADFvvi87PlmBSCAtZI5xwGjF5qE0xkLf0jjKUn3DzmpDP52Q==", + "dev": true + }, + "vscode-nls": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-5.0.0.tgz", + "integrity": "sha512-u0Lw+IYlgbEJFF6/qAqG2d1jQmJl0eyAGJHoAJqr2HT4M2BNuQYSEiSE75f52pXHSJm8AlTjnLLbBFPrdz2hpA==", + "dev": true + }, + "vscode-uri": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.2.tgz", + "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==", + "dev": true + }, + "w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "dev": true, + "requires": { + "browser-process-hrtime": "^1.0.0" + } + }, + "w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "dev": true, + "requires": { + "xml-name-validator": "^3.0.0" + } + }, + "walk-up-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz", + "integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==", + "devOptional": true, + "peer": true + }, + "walkdir": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.4.1.tgz", + "integrity": "sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ==", + "dev": true + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.x" + } + }, + "watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "peer": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "dependencies": { + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "peer": true + } + } + }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "devOptional": true, + "requires": { + "defaults": "^1.0.3" + } + }, + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true + }, + "webpack": { + "version": "5.73.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz", + "integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==", + "dev": true, + "peer": true, + "requires": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.4.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.9.3", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.3.1", + "webpack-sources": "^3.2.3" + }, + "dependencies": { + "acorn": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "dev": true, + "peer": true + }, + "acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "dev": true, + "peer": true, + "requires": {} + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "peer": true + } + } + }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "peer": true + }, + "whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "requires": { + "iconv-lite": "0.4.24" + } + }, + "whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true + }, + "whatwg-url": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "dev": true, + "requires": { + "lodash": "^4.7.0", + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "which-pm": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.0.0.tgz", + "integrity": "sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==", + "devOptional": true, + "peer": true, + "requires": { + "load-yaml-file": "^0.2.0", + "path-exists": "^4.0.0" + } + }, + "wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "requires": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "devOptional": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "ws": { + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", + "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", + "dev": true, + "requires": {} + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + }, + "yargs-parser": { + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "dev": true + }, + "yeoman-environment": { + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/yeoman-environment/-/yeoman-environment-3.13.0.tgz", + "integrity": "sha512-eBPpBZCvFzx6yk17x+ZrOHp8ADDv6qHradV+SgdugaQKIy9NjEX5AkbwdTHLOgccSTkQ9rN791xvYOu6OmqjBg==", + "devOptional": true, + "peer": true, + "requires": { "@npmcli/arborist": "^4.0.4", "are-we-there-yet": "^2.0.0", "arrify": "^2.0.1", @@ -25101,183 +27758,712 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-7.1.0.tgz", "integrity": "sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg==", "devOptional": true, - "peer": true + "peer": true + }, + "diff": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "devOptional": true, + "peer": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "devOptional": true, + "peer": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "devOptional": true, + "peer": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "devOptional": true, + "peer": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "devOptional": true, + "peer": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "devOptional": true, + "peer": true + }, + "inquirer": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", + "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", + "devOptional": true, + "peer": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^7.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "devOptional": true, + "peer": true, + "requires": { + "p-locate": "^5.0.0" + } }, - "diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "devOptional": true, - "peer": true + "peer": true, + "requires": { + "yocto-queue": "^0.1.0" + } }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "devOptional": true, + "peer": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "rxjs": { + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", + "devOptional": true, + "peer": true, + "requires": { + "tslib": "^2.1.0" + } + }, + "tslib": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", + "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", "devOptional": true, "peer": true + } + } + }, + "yeoman-generator": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-5.10.0.tgz", + "integrity": "sha512-iDUKykV7L4nDNzeYSedRmSeJ5eMYFucnKDi6KN1WNASXErgPepKqsQw55TgXPHnmpcyOh2Dd/LAZkyc+f0qaAw==", + "requires": { + "chalk": "^4.1.0", + "dargs": "^7.0.0", + "debug": "^4.1.1", + "execa": "^5.1.1", + "github-username": "^6.0.0", + "lodash": "^4.17.11", + "mem-fs-editor": "^9.0.0", + "minimist": "^1.2.5", + "pacote": "^15.2.0", + "read-pkg-up": "^7.0.1", + "run-async": "^2.0.0", + "semver": "^7.2.1", + "shelljs": "^0.8.5", + "sort-keys": "^4.2.0", + "text-table": "^0.2.0" + }, + "dependencies": { + "@npmcli/fs": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz", + "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==", + "requires": { + "semver": "^7.3.5" + } + }, + "@npmcli/git": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.1.0.tgz", + "integrity": "sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ==", + "requires": { + "@npmcli/promise-spawn": "^6.0.0", + "lru-cache": "^7.4.4", + "npm-pick-manifest": "^8.0.0", + "proc-log": "^3.0.0", + "promise-inflight": "^1.0.1", + "promise-retry": "^2.0.1", + "semver": "^7.3.5", + "which": "^3.0.0" + } + }, + "@npmcli/installed-package-contents": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz", + "integrity": "sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ==", + "requires": { + "npm-bundled": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + } + }, + "@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "requires": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + } + }, + "@npmcli/node-gyp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz", + "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==" + }, + "@npmcli/promise-spawn": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz", + "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==", + "requires": { + "which": "^3.0.0" + } + }, + "@npmcli/run-script": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.2.tgz", + "integrity": "sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA==", + "requires": { + "@npmcli/node-gyp": "^3.0.0", + "@npmcli/promise-spawn": "^6.0.0", + "node-gyp": "^9.0.0", + "read-package-json-fast": "^3.0.0", + "which": "^3.0.0" + } + }, + "@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==" + }, + "are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + } + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + }, + "builtins": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", + "requires": { + "semver": "^7.0.0" + } + }, + "cacache": { + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.1.4.tgz", + "integrity": "sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A==", + "requires": { + "@npmcli/fs": "^3.1.0", + "fs-minipass": "^3.0.0", + "glob": "^10.2.2", + "lru-cache": "^7.7.1", + "minipass": "^7.0.3", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^4.0.0", + "ssri": "^10.0.0", + "tar": "^6.1.11", + "unique-filename": "^3.0.0" + }, + "dependencies": { + "glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + } + }, + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "requires": { + "minipass": "^7.0.3" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "requires": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + } + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "hosted-git-info": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", + "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==", + "requires": { + "lru-cache": "^7.5.1" + } + }, + "http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "requires": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + } + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + }, + "ignore-walk": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.3.tgz", + "integrity": "sha512-C7FfFoTA+bI10qfeydT8aZbvr91vAEU+2W5BZUlzPec47oNb07SsOfwYrtxuvOYdUApPP/Qlh4DtAO51Ekk2QA==", + "requires": { + "minimatch": "^9.0.0" + } + }, + "lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==" + }, + "make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "dependencies": { + "@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "requires": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + } + }, + "cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "requires": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + } + }, + "fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "requires": { + "minipass": "^3.0.0" + } + }, + "glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + }, + "ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "requires": { + "minipass": "^3.1.1" + } + }, + "unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "requires": { + "unique-slug": "^3.0.0" + } + }, + "unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "requires": { + "imurmurhash": "^0.1.4" + } + } + } }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "devOptional": true, - "peer": true, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "brace-expansion": "^2.0.1" } }, - "find-up": { + "minipass": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "devOptional": true, - "peer": true, + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==" + }, + "minipass-fetch": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" + "encoding": "^0.1.13", + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "dependencies": { + "minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "requires": { + "yallist": "^4.0.0" + } + } } }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "devOptional": true, - "peer": true + "node-gyp": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.4.1.tgz", + "integrity": "sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ==", + "requires": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "requires": { + "isexe": "^2.0.0" + } + } + } }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "devOptional": true, - "peer": true + "nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "requires": { + "abbrev": "^1.0.0" + } }, - "inquirer": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", - "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", - "devOptional": true, - "peer": true, + "npm-bundled": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz", + "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==", "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^7.0.0" + "npm-normalize-package-bin": "^3.0.0" } }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "devOptional": true, - "peer": true, + "npm-install-checks": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.3.0.tgz", + "integrity": "sha512-W29RiK/xtpCGqn6f3ixfRYGk+zRyr+Ew9F2E20BfXxT5/euLdA/Nm7fO7OeTGuAmTs30cpgInyJ0cYe708YTZw==", "requires": { - "p-locate": "^5.0.0" + "semver": "^7.1.1" } }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "devOptional": true, - "peer": true, + "npm-normalize-package-bin": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz", + "integrity": "sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==" + }, + "npm-package-arg": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz", + "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==", "requires": { - "yocto-queue": "^0.1.0" + "hosted-git-info": "^6.0.0", + "proc-log": "^3.0.0", + "semver": "^7.3.5", + "validate-npm-package-name": "^5.0.0" } }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "devOptional": true, - "peer": true, + "npm-packlist": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz", + "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==", "requires": { - "p-limit": "^3.0.2" + "ignore-walk": "^6.0.0" } }, - "rxjs": { - "version": "7.8.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", - "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", - "devOptional": true, - "peer": true, + "npm-pick-manifest": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.2.tgz", + "integrity": "sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg==", "requires": { - "tslib": "^2.1.0" + "npm-install-checks": "^6.0.0", + "npm-normalize-package-bin": "^3.0.0", + "npm-package-arg": "^10.0.0", + "semver": "^7.3.5" } }, - "tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", - "devOptional": true, - "peer": true - } - } - }, - "yeoman-generator": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-5.7.0.tgz", - "integrity": "sha512-z9ZwgKoDOd+llPDCwn8Ax2l4In5FMhlslxdeByW4AMxhT+HbTExXKEAahsClHSbwZz1i5OzRwLwRIUdOJBr5Bw==", - "requires": { - "chalk": "^4.1.0", - "dargs": "^7.0.0", - "debug": "^4.1.1", - "execa": "^5.1.1", - "github-username": "^6.0.0", - "lodash": "^4.17.11", - "minimist": "^1.2.5", - "read-pkg-up": "^7.0.1", - "run-async": "^2.0.0", - "semver": "^7.2.1", - "shelljs": "^0.8.5", - "sort-keys": "^4.2.0", - "text-table": "^0.2.0" - }, - "dependencies": { - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "npm-registry-fetch": { + "version": "14.0.5", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz", + "integrity": "sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA==", "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "make-fetch-happen": "^11.0.0", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-json-stream": "^1.0.1", + "minizlib": "^2.1.2", + "npm-package-arg": "^10.0.0", + "proc-log": "^3.0.0" + }, + "dependencies": { + "make-fetch-happen": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz", + "integrity": "sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w==", + "requires": { + "agentkeepalive": "^4.2.1", + "cacache": "^17.0.0", + "http-cache-semantics": "^4.1.1", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^5.0.0", + "minipass-fetch": "^3.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^10.0.0" + } + }, + "minipass-fetch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.4.tgz", + "integrity": "sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg==", + "requires": { + "encoding": "^0.1.13", + "minipass": "^7.0.3", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + } } }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + "npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "requires": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + } }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" + "pacote": { + "version": "15.2.0", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.2.0.tgz", + "integrity": "sha512-rJVZeIwHTUta23sIZgEIM62WYwbmGbThdbnkt81ravBplQv+HjyroqnLRNH2+sLJHcGZmLRmhPwACqhfTcOmnA==", + "requires": { + "@npmcli/git": "^4.0.0", + "@npmcli/installed-package-contents": "^2.0.1", + "@npmcli/promise-spawn": "^6.0.1", + "@npmcli/run-script": "^6.0.0", + "cacache": "^17.0.0", + "fs-minipass": "^3.0.0", + "minipass": "^5.0.0", + "npm-package-arg": "^10.0.0", + "npm-packlist": "^7.0.0", + "npm-pick-manifest": "^8.0.0", + "npm-registry-fetch": "^14.0.0", + "proc-log": "^3.0.0", + "promise-retry": "^2.0.1", + "read-package-json": "^6.0.0", + "read-package-json-fast": "^3.0.0", + "sigstore": "^1.3.0", + "ssri": "^10.0.0", + "tar": "^6.1.11" + } }, "parse-json": { "version": "5.2.0", @@ -25290,6 +28476,27 @@ "lines-and-columns": "^1.1.6" } }, + "proc-log": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz", + "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==" + }, + "read-package-json-fast": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz", + "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==", + "requires": { + "json-parse-even-better-errors": "^3.0.0", + "npm-normalize-package-bin": "^3.0.0" + }, + "dependencies": { + "json-parse-even-better-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz", + "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==" + } + } + }, "read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -25318,10 +28525,90 @@ "type-fest": "^0.8.1" } }, + "readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "requires": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + } + }, + "ssri": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.5.tgz", + "integrity": "sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A==", + "requires": { + "minipass": "^7.0.3" + }, + "dependencies": { + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==" + } + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, "type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==" + }, + "unique-filename": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz", + "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==", + "requires": { + "unique-slug": "^4.0.0" + } + }, + "unique-slug": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz", + "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==", + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "validate-npm-package-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz", + "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==", + "requires": { + "builtins": "^5.0.0" + } + }, + "which": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz", + "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==", + "requires": { + "isexe": "^2.0.0" + } } } }, diff --git a/package.json b/package.json index d828b98c..af8cf098 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "js-yaml": "^4.1.0", "jsonschema": "^1.2.6", "lodash": "^4.17.21", - "yeoman-generator": "^5.7.0" + "yeoman-generator": "^5.10.0" }, "devDependencies": { "@types/jest": "^27.0.1", @@ -43,7 +43,7 @@ "@types/js-yaml": "^4.0.1", "@types/lodash": "^4.14.168", "@types/node-fetch": "^2.5.10", - "@types/yeoman-generator": "^4.11.3", + "@types/yeoman-generator": "^5.2.14", "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.22.0", "copyfiles": "2.4.1", From 91d08f901dee091599586d46a890870cdb065847 Mon Sep 17 00:00:00 2001 From: dzikowski Date: Wed, 20 Dec 2023 17:13:55 +0000 Subject: [PATCH 40/83] Fablo: Christmas edition Signed-off-by: dzikowski --- fablo.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/fablo.sh b/fablo.sh index c6fde7b8..83e55161 100755 --- a/fablo.sh +++ b/fablo.sh @@ -41,11 +41,19 @@ printSplash() { darkGray=$'\e[90m' end=$'\e[0m' echo "" - echo "┌────── .─. ┌─────. ╷ .────." - echo "│ / \ │ │ │ ╱ ╲ " - echo "├───── / \ ├─────: │ │ │" - echo "│ /───────\ │ │ │ ╲ ╱ " - printf "╵ / \ └─────' └────── '────' %24s\n" "v$FABLO_VERSION" + if [ "$(date +%m%d)" -gt "1215" ]; then + echo "┌────── * ┌─────. ╷ .────." + echo "│ _/_\_ │ │ │ ╱ ╲ " + echo "├───── _/___\_ ├─────: │ │ │" + echo "│ _/_____\_ │ │ │ ╲ ╱ " + printf "╵ |_| └─────' └────── '────' %24s\n" "v$FABLO_VERSION" + else + echo "┌────── .─. ┌─────. ╷ .────." + echo "│ / \ │ │ │ ╱ ╲ " + echo "├───── / \ ├─────: │ │ │" + echo "│ /───────\ │ │ │ ╲ ╱ " + printf "╵ / \ └─────' └────── '────' %24s\n" "v$FABLO_VERSION" + fi echo "${darkGray}┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐" echo "│ https://fablo.io | created at SoftwareMill | backed by Hyperledger Foundation│" echo "└┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘${end}" From 72c00798bc0a66988dbd7f4abea0338d85f5975e Mon Sep 17 00:00:00 2001 From: roopsai surampudi Date: Sun, 7 Apr 2024 15:52:46 +0000 Subject: [PATCH 41/83] Add depends_on section for peers Signed-off-by: roopsai surampudi --- src/setup-docker/templates/fabric-docker/docker-compose.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/setup-docker/templates/fabric-docker/docker-compose.yaml b/src/setup-docker/templates/fabric-docker/docker-compose.yaml index a94e99c0..8f5189e4 100755 --- a/src/setup-docker/templates/fabric-docker/docker-compose.yaml +++ b/src/setup-docker/templates/fabric-docker/docker-compose.yaml @@ -298,6 +298,9 @@ services: - COUCHDB_PASSWORD=<%= peer.name %>Password ports: - <%= peer.couchDbExposePort %>:5984 + depends_on: + couchdb.<%= peer.name %>.<%= org.domain %>: + condition: service_healthy networks: - basic <%_ } _%> From 8a2ec4a114d284f436a8fa0233a2e5cef8a208f8 Mon Sep 17 00:00:00 2001 From: roopsai surampudi Date: Mon, 8 Apr 2024 15:51:22 +0000 Subject: [PATCH 42/83] Add snapshot Signed-off-by: roopsai surampudi --- ...config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 4c703b5d..67b3826b 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -2113,6 +2113,9 @@ services: - COUCHDB_PASSWORD=peer0Password ports: - 5100:5984 + depends_on: + couchdb.peer0.org1.example.com: + condition: service_healthy networks: - basic From 008acb8cd8f217148b616271897f613c29c99cb1 Mon Sep 17 00:00:00 2001 From: roopsai surampudi Date: Tue, 9 Apr 2024 15:48:21 +0000 Subject: [PATCH 43/83] Add Contributing Guidelines Signed-off-by: roopsai surampudi --- CONTRIBUTING.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 5 +++++ 2 files changed, 54 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..95ae7d97 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# Contributing Guidelines + +Thank you for considering contributing to our project! We welcome contributions from everyone and appreciate your interest in making our project better. + +## Sign off Your Work + +The Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the [DCO](http://developercertificate.org/). Contributors must sign-off that they adhere to these requirements by adding a `Signed-off-by` line to commit messages. + +```text +This is my commit message + +Signed-off-by: John Doe +``` + +See `git help commit`: + +```text +-s, --signoff + Add Signed-off-by line by the committer at the end of the commit log + message. The meaning of a signoff depends on the project, but it typically + certifies that committer has the rights to submit this work under the same + license and agrees to a Developer Certificate of Origin (see + http://developercertificate.org/ for more information). +``` + +## Getting Started + +1. **Fork the repository**: Click the "Fork" button at the top right corner of the repository's page on GitHub. +2. **Clone your fork**: Use `git clone` to clone the repository to your local machine. +3. **Set up remote upstream**: Add the original repository as a remote named "upstream" using `git remote add upstream [original repository URL]`. +4. **Create a new branch**: Use `git checkout -b [branch-name]` to create a new branch for your contribution. + +## Making Changes + +1. **Make your changes**: Implement the changes or additions you want to make. Please follow any coding standards and guidelines provided in the project. +2. **Test your changes**: Ensure that your changes work as expected and don't introduce any new issues. Run the following tests: + - **End-to-End (E2E) tests**: Execute E2E tests using the provided scripts. You can run E2E tests with `npm run test:e2e`. Make sure they pass before submitting your changes. + - **Regular integration tests**: Run regular integration tests to validate the functionality. You can run integration tests with `npm run test:integration`. +3. **Update snapshots**: If you've made changes that affect snapshots, update them using `npm run test:e2e-update`. + +## Submitting Changes + +1. **Push your changes**: Once you've made and tested your changes, push them to your forked repository with `git push origin [branch-name]`. +2. **Create a pull request**: Go to the original repository on GitHub and create a pull request from your forked branch to the main branch. +3. **Provide details**: Give your pull request a descriptive title and provide details about the changes you've made. +4. **Review process**: Your pull request will be reviewed by maintainers. Be responsive to any feedback and make necessary changes. + +We appreciate your contributions and look forward to working with you! + diff --git a/README.md b/README.md index d8d6c084..d86d2c8e 100644 --- a/README.md +++ b/README.md @@ -579,6 +579,11 @@ Visit the [Fablo REST](https://github.com/softwaremill/fablo-rest) project for m Fablo can run [Blockchain Explorer](https://github.com/hyperledger/blockchain-explorer) for you. Provide for your organization `"tools": { "explorer": true }`, if you want to use it per organization, or provide the same value in `global` section of the config, if you want to use one global Explorer for all organizations. +## Contributing + +We'd love to have you contribute! Please refer to our [contribution guidelines](https://github.com/hyperledger-labs/fablo/blob/main/CONTRIBUTING.md) for details. + + ## Testimonials Fablo was originally created at [SoftwareMill](https://softwaremill.com) by [@Hejwo](https://github.com/Hejwo/) and [@dzikowski](https://github.com/dzikowski/). From 302a2af22ca6e736bf7a9b8d9090de8ecd5593f0 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 9 Apr 2024 22:32:41 +0200 Subject: [PATCH 44/83] Revert "Add depends_on section for peers which are using CouchDb" Signed-off-by: Jakub Dzikowski --- ...config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap | 3 --- src/setup-docker/templates/fabric-docker/docker-compose.yaml | 3 --- 2 files changed, 6 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 67b3826b..4c703b5d 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -2113,9 +2113,6 @@ services: - COUCHDB_PASSWORD=peer0Password ports: - 5100:5984 - depends_on: - couchdb.peer0.org1.example.com: - condition: service_healthy networks: - basic diff --git a/src/setup-docker/templates/fabric-docker/docker-compose.yaml b/src/setup-docker/templates/fabric-docker/docker-compose.yaml index 8f5189e4..a94e99c0 100755 --- a/src/setup-docker/templates/fabric-docker/docker-compose.yaml +++ b/src/setup-docker/templates/fabric-docker/docker-compose.yaml @@ -298,9 +298,6 @@ services: - COUCHDB_PASSWORD=<%= peer.name %>Password ports: - <%= peer.couchDbExposePort %>:5984 - depends_on: - couchdb.<%= peer.name %>.<%= org.domain %>: - condition: service_healthy networks: - basic <%_ } _%> From febe7fb2235998877c49fc58f7a87fcb2f5497c8 Mon Sep 17 00:00:00 2001 From: Sanket Date: Tue, 9 Apr 2024 16:54:33 +0530 Subject: [PATCH 45/83] fix: request to https if the tls is enabled Signed-off-by: Sanket added the snapshots --- ...hlf1.4-1org-1chaincode-raft.json.test.ts.snap | 8 ++++---- ...f1.4-2orgs-2chaincodes-raft.json.test.ts.snap | 12 ++++++------ ...rg-1chaincode-raft-explorer.json.test.ts.snap | 8 ++++---- ...hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 16 ++++++++-------- ...gs-1chaincode-raft-explorer.json.test.ts.snap | 16 ++++++++-------- src/types/ConnectionProfile.ts | 2 +- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index 5a556a57..74be6c0d 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -235,7 +235,7 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro }, \\"certificateAuthorities\\": { \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", + \\"url\\": \\"https://localhost:7020\\", \\"caName\\": \\"ca.orderer.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" @@ -280,7 +280,7 @@ peers: ssl-target-name-override: peer1.org1.example.com certificateAuthorities: ca.orderer.example.com: - url: http://localhost:7020 + url: https://localhost:7020 caName: ca.orderer.example.com tlsCACerts: path: >- @@ -332,7 +332,7 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro }, \\"certificateAuthorities\\": { \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", + \\"url\\": \\"https://localhost:7040\\", \\"caName\\": \\"ca.org1.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" @@ -377,7 +377,7 @@ peers: ssl-target-name-override: peer1.org1.example.com certificateAuthorities: ca.org1.example.com: - url: http://localhost:7040 + url: https://localhost:7040 caName: ca.org1.example.com tlsCACerts: path: >- diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index dea28f9e..61a95e2e 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -317,7 +317,7 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p }, \\"certificateAuthorities\\": { \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", + \\"url\\": \\"https://localhost:7020\\", \\"caName\\": \\"ca.orderer.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" @@ -378,7 +378,7 @@ peers: ssl-target-name-override: peer1.org2.example.com certificateAuthorities: ca.orderer.example.com: - url: http://localhost:7020 + url: https://localhost:7020 caName: ca.orderer.example.com tlsCACerts: path: >- @@ -450,7 +450,7 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p }, \\"certificateAuthorities\\": { \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", + \\"url\\": \\"https://localhost:7040\\", \\"caName\\": \\"ca.org1.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" @@ -511,7 +511,7 @@ peers: ssl-target-name-override: peer1.org2.example.com certificateAuthorities: ca.org1.example.com: - url: http://localhost:7040 + url: https://localhost:7040 caName: ca.org1.example.com tlsCACerts: path: >- @@ -583,7 +583,7 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p }, \\"certificateAuthorities\\": { \\"ca.org2.example.com\\": { - \\"url\\": \\"http://localhost:7060\\", + \\"url\\": \\"https://localhost:7060\\", \\"caName\\": \\"ca.org2.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\" @@ -644,7 +644,7 @@ peers: ssl-target-name-override: peer1.org2.example.com certificateAuthorities: ca.org2.example.com: - url: http://localhost:7060 + url: https://localhost:7060 caName: ca.org2.example.com tlsCACerts: path: >- diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 4c703b5d..841bb38e 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -222,7 +222,7 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre }, \\"certificateAuthorities\\": { \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", + \\"url\\": \\"https://localhost:7020\\", \\"caName\\": \\"ca.orderer.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" @@ -259,7 +259,7 @@ peers: ssl-target-name-override: peer0.org1.example.com certificateAuthorities: ca.orderer.example.com: - url: http://localhost:7020 + url: https://localhost:7020 caName: ca.orderer.example.com tlsCACerts: path: >- @@ -301,7 +301,7 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre }, \\"certificateAuthorities\\": { \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", + \\"url\\": \\"https://localhost:7040\\", \\"caName\\": \\"ca.org1.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" @@ -338,7 +338,7 @@ peers: ssl-target-name-override: peer0.org1.example.com certificateAuthorities: ca.org1.example.com: - url: http://localhost:7040 + url: https://localhost:7040 caName: ca.org1.example.com tlsCACerts: path: >- diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index c8e43da3..68973e62 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -408,7 +408,7 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro }, \\"certificateAuthorities\\": { \\"ca.orderer1.com\\": { - \\"url\\": \\"http://localhost:7020\\", + \\"url\\": \\"https://localhost:7020\\", \\"caName\\": \\"ca.orderer1.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer1.com/ca/ca.orderer1.com-cert.pem\\" @@ -469,7 +469,7 @@ peers: ssl-target-name-override: peer1.org2.example.com certificateAuthorities: ca.orderer1.com: - url: http://localhost:7020 + url: https://localhost:7020 caName: ca.orderer1.com tlsCACerts: path: >- @@ -541,7 +541,7 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro }, \\"certificateAuthorities\\": { \\"ca.orderer2.com\\": { - \\"url\\": \\"http://localhost:7040\\", + \\"url\\": \\"https://localhost:7040\\", \\"caName\\": \\"ca.orderer2.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer2.com/ca/ca.orderer2.com-cert.pem\\" @@ -602,7 +602,7 @@ peers: ssl-target-name-override: peer1.org2.example.com certificateAuthorities: ca.orderer2.com: - url: http://localhost:7040 + url: https://localhost:7040 caName: ca.orderer2.com tlsCACerts: path: >- @@ -674,7 +674,7 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro }, \\"certificateAuthorities\\": { \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7060\\", + \\"url\\": \\"https://localhost:7060\\", \\"caName\\": \\"ca.org1.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" @@ -735,7 +735,7 @@ peers: ssl-target-name-override: peer1.org2.example.com certificateAuthorities: ca.org1.example.com: - url: http://localhost:7060 + url: https://localhost:7060 caName: ca.org1.example.com tlsCACerts: path: >- @@ -807,7 +807,7 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro }, \\"certificateAuthorities\\": { \\"ca.org2.example.com\\": { - \\"url\\": \\"http://localhost:7080\\", + \\"url\\": \\"https://localhost:7080\\", \\"caName\\": \\"ca.org2.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\" @@ -868,7 +868,7 @@ peers: ssl-target-name-override: peer1.org2.example.com certificateAuthorities: ca.org2.example.com: - url: http://localhost:7080 + url: https://localhost:7080 caName: ca.org2.example.com tlsCACerts: path: >- diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index cd7e1db7..ddb52d89 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -423,7 +423,7 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr }, \\"certificateAuthorities\\": { \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", + \\"url\\": \\"https://localhost:7020\\", \\"caName\\": \\"ca.orderer.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" @@ -500,7 +500,7 @@ peers: ssl-target-name-override: peer1.org3.example.com certificateAuthorities: ca.orderer.example.com: - url: http://localhost:7020 + url: https://localhost:7020 caName: ca.orderer.example.com tlsCACerts: path: >- @@ -592,7 +592,7 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr }, \\"certificateAuthorities\\": { \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", + \\"url\\": \\"https://localhost:7040\\", \\"caName\\": \\"ca.org1.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" @@ -669,7 +669,7 @@ peers: ssl-target-name-override: peer1.org3.example.com certificateAuthorities: ca.org1.example.com: - url: http://localhost:7040 + url: https://localhost:7040 caName: ca.org1.example.com tlsCACerts: path: >- @@ -761,7 +761,7 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr }, \\"certificateAuthorities\\": { \\"ca.org2.example.com\\": { - \\"url\\": \\"http://localhost:7060\\", + \\"url\\": \\"https://localhost:7060\\", \\"caName\\": \\"ca.org2.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\" @@ -838,7 +838,7 @@ peers: ssl-target-name-override: peer1.org3.example.com certificateAuthorities: ca.org2.example.com: - url: http://localhost:7060 + url: https://localhost:7060 caName: ca.org2.example.com tlsCACerts: path: >- @@ -930,7 +930,7 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr }, \\"certificateAuthorities\\": { \\"ca.org3.example.com\\": { - \\"url\\": \\"http://localhost:7080\\", + \\"url\\": \\"https://localhost:7080\\", \\"caName\\": \\"ca.org3.example.com\\", \\"tlsCACerts\\": { \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/ca/ca.org3.example.com-cert.pem\\" @@ -1007,7 +1007,7 @@ peers: ssl-target-name-override: peer1.org3.example.com certificateAuthorities: ca.org3.example.com: - url: http://localhost:7080 + url: https://localhost:7080 caName: ca.org3.example.com tlsCACerts: path: >- diff --git a/src/types/ConnectionProfile.ts b/src/types/ConnectionProfile.ts index fb4dc911..865b1663 100644 --- a/src/types/ConnectionProfile.ts +++ b/src/types/ConnectionProfile.ts @@ -155,7 +155,7 @@ function certificateAuthorities( if (isTls) { return { [org.ca.address]: { - url: `http://localhost:${org.ca.exposePort}`, + url: `https://localhost:${org.ca.exposePort}`, caName: org.ca.address, tlsCACerts: { path: `${rootPath}/peerOrganizations/${org.domain}/ca/${org.ca.address}-cert.pem`, From b465ec43c094c94d43b201017ca65b69ab074ffa Mon Sep 17 00:00:00 2001 From: roopsai surampudi Date: Wed, 10 Apr 2024 13:54:13 +0000 Subject: [PATCH 46/83] Add more information into Contributing docs Signed-off-by: roopsai surampudi --- CONTRIBUTING.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95ae7d97..26616f9a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,10 +33,17 @@ See `git help commit`: ## Making Changes 1. **Make your changes**: Implement the changes or additions you want to make. Please follow any coding standards and guidelines provided in the project. -2. **Test your changes**: Ensure that your changes work as expected and don't introduce any new issues. Run the following tests: - - **End-to-End (E2E) tests**: Execute E2E tests using the provided scripts. You can run E2E tests with `npm run test:e2e`. Make sure they pass before submitting your changes. - - **Regular integration tests**: Run regular integration tests to validate the functionality. You can run integration tests with `npm run test:integration`. -3. **Update snapshots**: If you've made changes that affect snapshots, update them using `npm run test:e2e-update`. +2. **Test your changes**: Ensure that your changes work as expected and don't introduce any new issues. Depending on the scope of your changes you may rely on our CI pipelines or run the following tests: + - **Unit tests**: Execute unit tests using the provided scripts. Use: `npm run test:unit`. + - **End-to-End (E2E) tests**: Execute E2E tests using the provided scripts. Use: `npm run test:e2e`. + - **Ent-to-End network tests**: Execute relevant shell scripts from `e2e-network` directory with E2E network tests. +3. **Update snapshots**: If you've made changes that affect snapshots (esp. any template changes), update them using `npm run test:e2e-update`. + +## ## Running Fablo locally + +You may want to verify some changes by running Fablo locally. To do so: +1. Execute `./fablo-build.sh` script to create a Fablo Docker image locally. +2. Use `./fablo.sh` from source root directory to call Fablo commands. ## Submitting Changes From 930c1c7efc70a139c51c93ca1bad9de2c6971171 Mon Sep 17 00:00:00 2001 From: roopsai surampudi Date: Wed, 10 Apr 2024 17:56:24 +0000 Subject: [PATCH 47/83] Add depends_on section of peers Signed-off-by: roopsai surampudi --- .../templates/fabric-docker/docker-compose.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/setup-docker/templates/fabric-docker/docker-compose.yaml b/src/setup-docker/templates/fabric-docker/docker-compose.yaml index 8f5189e4..342a4fad 100755 --- a/src/setup-docker/templates/fabric-docker/docker-compose.yaml +++ b/src/setup-docker/templates/fabric-docker/docker-compose.yaml @@ -280,6 +280,11 @@ services: <%_ if(global.peerDevMode) { _%> - <%= peer.port + 1500 %>:7050 <%_ } _%> + <%_ if(peer.db.type==="CouchDb") { _%> + depends_on: + couchdb.<%= peer.name %>.<%= org.domain %>: + condition: service_healthy + <%_ } _%> volumes: - /var/run/docker.sock:/host/var/run/docker.sock - ../fabric-config/crypto-config/peerOrganizations/<%= org.domain %>/peers/<%= peer.address %>/msp:/etc/hyperledger/fabric/peer/msp @@ -298,9 +303,6 @@ services: - COUCHDB_PASSWORD=<%= peer.name %>Password ports: - <%= peer.couchDbExposePort %>:5984 - depends_on: - couchdb.<%= peer.name %>.<%= org.domain %>: - condition: service_healthy networks: - basic <%_ } _%> From e516aa54189ca934b59bd13322b7a160efb0c04f Mon Sep 17 00:00:00 2001 From: roopsai surampudi Date: Wed, 10 Apr 2024 18:04:44 +0000 Subject: [PATCH 48/83] Add snapshot Signed-off-by: roopsai surampudi --- ...fig-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 67b3826b..f28843b2 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -2096,6 +2096,9 @@ services: ports: - 8041:9440 - 7041:7041 + depends_on: + couchdb.peer0.org1.example.com: + condition: service_healthy volumes: - /var/run/docker.sock:/host/var/run/docker.sock - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp @@ -2113,9 +2116,6 @@ services: - COUCHDB_PASSWORD=peer0Password ports: - 5100:5984 - depends_on: - couchdb.peer0.org1.example.com: - condition: service_healthy networks: - basic From 8410250a00303fd18b8e453c0660554abd21b048 Mon Sep 17 00:00:00 2001 From: roopsai surampudi Date: Thu, 11 Apr 2024 04:39:05 +0000 Subject: [PATCH 49/83] Add snapshots Signed-off-by: roopsai surampudi --- ...-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap | 1 - ...lo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap | 1 - .../fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 2 -- ...hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap | 1 - ...-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap | 2 -- ...ig-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap | 7 +++---- .../fablo-config-hlf2-1org-1chaincode.json.test.ts.snap | 1 - ...lo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 2 -- ...g-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap | 3 --- .../templates/fabric-docker/docker-compose.yaml | 7 +++---- 10 files changed, 6 insertions(+), 21 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index 8a252baf..cd7c3b36 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -2698,7 +2698,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org1.example.com: container_name: peer1.org1.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index 5a556a57..22b95cee 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -2079,7 +2079,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org1.example.com: container_name: peer1.org1.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index f5017e09..50e36bbc 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -2766,7 +2766,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org1.example.com: container_name: peer1.org1.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} @@ -2895,7 +2894,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org2.example.com: container_name: peer1.org2.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index 468e5f16..7fc20cd9 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -2784,7 +2784,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org1.example.com: container_name: peer1.org1.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index dea28f9e..b928356d 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -3127,7 +3127,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org1.example.com: container_name: peer1.org1.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} @@ -3279,7 +3278,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org2.example.com: container_name: peer1.org2.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index f28843b2..fe1c23bc 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -2096,9 +2096,9 @@ services: ports: - 8041:9440 - 7041:7041 - depends_on: - couchdb.peer0.org1.example.com: - condition: service_healthy + depends_on: + couchdb.peer0.org1.example.com: + condition: service_healthy volumes: - /var/run/docker.sock:/host/var/run/docker.sock - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp @@ -2107,7 +2107,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - couchdb.peer0.org1.example.com: container_name: couchdb.peer0.org1.example.com image: couchdb:\${COUCHDB_VERSION} diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 136703a1..c8e5fa41 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1986,7 +1986,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org1.example.com: container_name: peer1.org1.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index c8e43da3..8b66621e 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -4161,7 +4161,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org1.example.com: container_name: peer1.org1.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} @@ -4318,7 +4317,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org2.example.com: container_name: peer1.org2.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index cd7e1db7..d8eb040e 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -4332,7 +4332,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org1.example.com: container_name: peer1.org1.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} @@ -4558,7 +4557,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org2.example.com: container_name: peer1.org2.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} @@ -4784,7 +4782,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - peer1.org3.example.com: container_name: peer1.org3.example.com image: hyperledger/fabric-peer:\${FABRIC_VERSION} diff --git a/src/setup-docker/templates/fabric-docker/docker-compose.yaml b/src/setup-docker/templates/fabric-docker/docker-compose.yaml index 342a4fad..c13a4e86 100755 --- a/src/setup-docker/templates/fabric-docker/docker-compose.yaml +++ b/src/setup-docker/templates/fabric-docker/docker-compose.yaml @@ -281,9 +281,9 @@ services: - <%= peer.port + 1500 %>:7050 <%_ } _%> <%_ if(peer.db.type==="CouchDb") { _%> - depends_on: - couchdb.<%= peer.name %>.<%= org.domain %>: - condition: service_healthy + depends_on: + couchdb.<%= peer.name %>.<%= org.domain %>: + condition: service_healthy <%_ } _%> volumes: - /var/run/docker.sock:/host/var/run/docker.sock @@ -293,7 +293,6 @@ services: - ../fabric-config/config:/etc/hyperledger/fabric/config networks: - basic - <%_ if(peer.db.type==="CouchDb") { _%> couchdb.<%= peer.name %>.<%= org.domain %>: container_name: couchdb.<%= peer.name %>.<%= org.domain %> From bc1e8991418084c0e82dff0d002f6142c879c4c9 Mon Sep 17 00:00:00 2001 From: roopsai surampudi Date: Thu, 11 Apr 2024 05:34:43 +0000 Subject: [PATCH 50/83] Add healthcheck Signed-off-by: roopsai surampudi --- ...nfig-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap | 5 +++++ src/setup-docker/templates/fabric-docker/docker-compose.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index fe1c23bc..46de529b 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -2113,6 +2113,11 @@ services: environment: - COUCHDB_USER=peer0 - COUCHDB_PASSWORD=peer0Password + healthcheck: + test: \\"curl -f http://localhost:5984/\\" + interval: 5s + timeout: 10s + retries: 7 ports: - 5100:5984 networks: diff --git a/src/setup-docker/templates/fabric-docker/docker-compose.yaml b/src/setup-docker/templates/fabric-docker/docker-compose.yaml index c13a4e86..9ac57cbb 100755 --- a/src/setup-docker/templates/fabric-docker/docker-compose.yaml +++ b/src/setup-docker/templates/fabric-docker/docker-compose.yaml @@ -300,6 +300,11 @@ services: environment: - COUCHDB_USER=<%= peer.name %> - COUCHDB_PASSWORD=<%= peer.name %>Password + healthcheck: + test: "curl -f http://localhost:5984/" + interval: 5s + timeout: 10s + retries: 7 ports: - <%= peer.couchDbExposePort %>:5984 networks: From bdaee67a3a94c6befa9e8166d0b594a70cd04dbd Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Thu, 13 Jun 2024 19:50:12 +0200 Subject: [PATCH 51/83] Remove dev dependencies on chaincode installation Signed-off-by: Jakub Dzikowski --- .../templates/fabric-docker/scripts/chaincode-functions-v2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index 50010e6d..ac9ac93e 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -69,7 +69,7 @@ chaincodeBuild() { if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build && npm install --production) fi fi } From ff29ee6e1affd28262ad4571beab38eb620302e0 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Thu, 13 Jun 2024 20:07:08 +0200 Subject: [PATCH 52/83] npm audit fix Signed-off-by: Jakub Dzikowski --- package-lock.json | 10106 ++++++++++++++------------------------------ package.json | 6 +- 2 files changed, 3273 insertions(+), 6839 deletions(-) diff --git a/package-lock.json b/package-lock.json index 301cb222..9977fad3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,18 +34,31 @@ "eslint-plugin-import": "^2.22.1", "eslint-plugin-json": "^2.1.2", "eslint-plugin-prettier": "^3.4.0", - "jest": "^26.6.3", - "jest-json-schema": "^5.0.0", + "jest": "^29.7.0", + "jest-json-schema": "^6.1.0", "madge": "^4.0.2", "prettier": "^2.2.1", "rimraf": "^3.0.2", - "ts-jest": "^26.5.5", + "ts-jest": "^29.1.4", "ts-loader": "^9.1.0", "ts-node": "^9.1.1", "typescript": "^4.2.4", "yeoman-test": "^5.1.0" } }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", @@ -55,32 +68,35 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz", - "integrity": "sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q==", - "dev": true + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@babel/core": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.0.tgz", - "integrity": "sha512-8YqpRig5NmIHlMLw09zMlPTvUVMILjqCOtVgu+TVNWEBvy9b5I3RRyhqnrV4hjgEK7n8P9OqvkWJAFmEL6Wwfw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.14.0", - "@babel/helper-compilation-targets": "^7.13.16", - "@babel/helper-module-transforms": "^7.14.0", - "@babel/helpers": "^7.14.0", - "@babel/parser": "^7.14.0", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.14.0", - "@babel/types": "^7.14.0", - "convert-source-map": "^1.7.0", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -91,205 +107,236 @@ } }, "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.12.13" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" } }, - "node_modules/@babel/core/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@babel/generator": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz", - "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", "dev": true, "dependencies": { - "@babel/types": "^7.14.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "node_modules/@babel/helper-compilation-targets": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", "dev": true, + "dependencies": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, "engines": { - "node": ">=0.10.0" + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.13.16", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", - "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.13.15", - "@babel/helper-validator-option": "^7.12.17", - "browserslist": "^4.14.5", - "semver": "^6.3.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "yallist": "^3.0.2" } }, "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "bin": { "semver": "bin/semver.js" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", "dev": true, "dependencies": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dev": true, "dependencies": { - "@babel/types": "^7.12.13" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", - "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dev": true, "dependencies": { - "@babel/types": "^7.13.12" + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", - "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", "dev": true, "dependencies": { - "@babel/types": "^7.13.12" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.0.tgz", - "integrity": "sha512-L40t9bxIuGOfpIGA3HNkJhU9qYrf4y5A5LUSw7rGMSn+pcG8dfJ0g6Zval6YJGd2nEjI7oP00fRdnhLKndx6bw==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.13.12", - "@babel/helper-replace-supers": "^7.13.12", - "@babel/helper-simple-access": "^7.13.12", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.14.0", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.14.0", - "@babel/types": "^7.14.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", - "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", "dev": true, "dependencies": { - "@babel/types": "^7.12.13" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", - "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", - "dev": true - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", - "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", + "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", "dev": true, - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.13.12", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.12" + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", - "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", "dev": true, "dependencies": { - "@babel/types": "^7.13.12" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", - "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dev": true, "dependencies": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "dev": true, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", - "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==" + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@babel/helper-validator-option": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", - "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", - "dev": true + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, "node_modules/@babel/helpers": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz", - "integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", "dev": true, "dependencies": { - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.14.0", - "@babel/types": "^7.14.0" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", - "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.14.0", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/highlight/node_modules/ansi-styles": { @@ -357,9 +404,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.1.tgz", - "integrity": "sha512-muUGEKu8E/ftMTPlNp+mc6zL3E9zKWmF5sDHZ5MSsoTP9Wyz64AhEf9kD08xYJ7w6Hdcu8H550ircnPyWSIF0Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -428,6 +475,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", @@ -501,12 +563,30 @@ } }, "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", - "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -540,48 +620,64 @@ } }, "node_modules/@babel/template": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", - "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.12.13", - "@babel/types": "^7.12.13" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.12.13" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.0.tgz", - "integrity": "sha512-dZ/a371EE5XNhTHomvtuLTUyx6UEoJmYX+DT5zBCQN3McHemsuIaKKYqsc/fs26BEkHs/lBZy0J571LP5z9kQA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.14.0", - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.14.0", - "@babel/types": "^7.14.0", - "debug": "^4.1.0", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.12.13" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/traverse/node_modules/globals": { @@ -594,13 +690,17 @@ } }, "node_modules/@babel/types": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz", - "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.0", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@bcoe/v8-coverage": { @@ -609,22 +709,6 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "node_modules/@cnakazawa/watch": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", - "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", - "dev": true, - "dependencies": { - "exec-sh": "^0.3.2", - "minimist": "^1.2.0" - }, - "bin": { - "watch": "cli.js" - }, - "engines": { - "node": ">=0.1.95" - } - }, "node_modules/@eslint/eslintrc": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.1.tgz", @@ -849,294 +933,358 @@ } }, "node_modules/@jest/console": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.2.tgz", - "integrity": "sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^26.6.2", - "jest-util": "^26.6.2", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/core": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", - "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "dependencies": { - "@jest/console": "^26.6.2", - "@jest/reporters": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", + "ci-info": "^3.2.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.6.2", - "jest-config": "^26.6.3", - "jest-haste-map": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.6.2", - "jest-resolve-dependencies": "^26.6.3", - "jest-runner": "^26.6.3", - "jest-runtime": "^26.6.3", - "jest-snapshot": "^26.6.2", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "jest-watcher": "^26.6.2", - "micromatch": "^4.0.2", - "p-each-series": "^2.1.0", - "rimraf": "^3.0.0", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, "node_modules/@jest/environment": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", - "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "dependencies": { - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^26.6.2" + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/fake-timers": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", - "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", - "@sinonjs/fake-timers": "^6.0.1", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^26.6.2", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers/node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@jest/fake-timers/node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@jest/globals": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.2.tgz", - "integrity": "sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "dependencies": { - "@jest/environment": "^26.6.2", - "@jest/types": "^26.6.2", - "expect": "^26.6.2" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/reporters": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz", - "integrity": "sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.4", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.6.2", - "jest-resolve": "^26.6.2", - "jest-util": "^26.6.2", - "jest-worker": "^26.6.2", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", - "source-map": "^0.6.0", "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^7.0.0" + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, - "optionalDependencies": { - "node-notifier": "^8.0.0" + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/source-map": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", - "integrity": "sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", - "source-map": "^0.6.0" + "graceful-fs": "^4.2.9" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/test-result": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.2.tgz", - "integrity": "sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "dependencies": { - "@jest/console": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/test-sequencer": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz", - "integrity": "sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "dependencies": { - "@jest/test-result": "^26.6.2", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.6.2", - "jest-runner": "^26.6.3", - "jest-runtime": "^26.6.3" + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/transform": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.2.tgz", - "integrity": "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "dependencies": { - "@babel/core": "^7.1.0", - "@jest/types": "^26.6.2", - "babel-plugin-istanbul": "^6.0.0", + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-util": "^26.6.2", - "micromatch": "^4.0.2", - "pirates": "^4.0.1", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "write-file-atomic": "^4.0.2" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "dependencies": { + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "@types/yargs": "^15.0.0", + "@types/yargs": "^17.0.8", "chalk": "^4.0.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, - "peer": true, "dependencies": { - "@jridgewell/set-array": "^1.0.0", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, - "peer": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, - "peer": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "peer": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", - "dev": true, - "peer": true + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, - "peer": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@nodelib/fs.scandir": { @@ -1832,6 +1980,12 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, "node_modules/@sindresorhus/is": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", @@ -1894,6 +2048,7 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "devOptional": true, + "peer": true, "engines": { "node": ">= 6" } @@ -1941,31 +2096,31 @@ } }, "node_modules/@types/babel__core": { - "version": "7.1.14", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz", - "integrity": "sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "node_modules/@types/babel__generator": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", - "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", - "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -1973,12 +2128,12 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.1.tgz", - "integrity": "sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", "dev": true, "dependencies": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "node_modules/@types/cacheable-request": { @@ -2033,9 +2188,9 @@ } }, "node_modules/@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true, "peer": true }, @@ -2056,9 +2211,9 @@ } }, "node_modules/@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "dependencies": { "@types/node": "*" @@ -2309,12 +2464,6 @@ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==" }, - "node_modules/@types/prettier": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.2.3.tgz", - "integrity": "sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA==", - "dev": true - }, "node_modules/@types/responselike": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", @@ -2324,9 +2473,9 @@ } }, "node_modules/@types/stack-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", - "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, "node_modules/@types/text-table": { @@ -2355,9 +2504,9 @@ } }, "node_modules/@types/yargs": { - "version": "15.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz", - "integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==", + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -2557,73 +2706,73 @@ } }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true, "peer": true }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true, "peer": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true, "peer": true }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true, "peer": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "peer": true, "dependencies": { @@ -2631,9 +2780,9 @@ } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "peer": true, "dependencies": { @@ -2641,79 +2790,79 @@ } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true, "peer": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "peer": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -2731,12 +2880,6 @@ "dev": true, "peer": true }, - "node_modules/abab": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", - "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", - "dev": true - }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -2754,16 +2897,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", - "dev": true, - "dependencies": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - } - }, "node_modules/acorn-jsx": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", @@ -2845,6 +2978,45 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -2914,9 +3086,9 @@ } }, "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", @@ -3022,33 +3194,6 @@ "node": ">=6.0" } }, - "node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array-differ": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", @@ -3084,15 +3229,6 @@ "node": ">=8" } }, - "node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array.prototype.flat": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", @@ -3144,15 +3280,6 @@ "devOptional": true, "peer": true }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ast-module-types": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-2.7.1.tgz", @@ -3186,18 +3313,6 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true, - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, "node_modules/axe-core": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.2.tgz", @@ -3216,56 +3331,80 @@ "peer": true }, "node_modules/babel-jest": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", - "integrity": "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "dependencies": { - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/babel__core": "^7.1.7", - "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^26.6.2", + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "slash": "^3.0.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.8.0" } }, "node_modules/babel-plugin-istanbul": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", - "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-instrument": "^5.0.4", "test-exclude": "^6.0.0" }, "engines": { "node": ">=8" } }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/babel-plugin-jest-hoist": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz", - "integrity": "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "dependencies": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", + "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/babel-preset-current-node-syntax": { @@ -3292,16 +3431,16 @@ } }, "node_modules/babel-preset-jest": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz", - "integrity": "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "dependencies": { - "babel-plugin-jest-hoist": "^26.6.2", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -3312,36 +3451,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "node_modules/base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -3395,20 +3504,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/bin-links/node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "devOptional": true, - "peer": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, "node_modules/binaryextensions": { "version": "4.18.0", "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-4.18.0.tgz", @@ -3484,43 +3579,46 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, - "node_modules/browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true - }, "node_modules/browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" }, "bin": { "browserslist": "cli.js" }, "engines": { "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" } }, "node_modules/bs-logger": { @@ -3611,26 +3709,6 @@ "node": ">= 10" } }, - "node_modules/cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -3688,27 +3766,29 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001223", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", - "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", - "dev": true - }, - "node_modules/capture-exit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", - "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", + "version": "1.0.30001633", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001633.tgz", + "integrity": "sha512-6sT0yf/z5jqf8tISAgpJDrmwOpLsrpnyCdD/lOZKvKkkJK4Dn0X5i7KF7THEZhOq+30bmhwBlNEaqPUiHiKtZg==", "dev": true, - "dependencies": { - "rsvp": "^4.8.4" - }, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, "node_modules/chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -3754,114 +3834,25 @@ } }, "node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "node_modules/cjs-module-lexer": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", - "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", - "dev": true - }, - "node_modules/class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/class-utils/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/cjs-module-lexer": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", + "dev": true }, "node_modules/clean-stack": { "version": "2.2.0", @@ -4024,7 +4015,7 @@ "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, "engines": { "iojs": ">= 1.0.0", @@ -4032,24 +4023,11 @@ } }, "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, - "node_modules/collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -4074,12 +4052,6 @@ "color-support": "bin.js" } }, - "node_modules/colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true - }, "node_modules/colors": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", @@ -4123,12 +4095,6 @@ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, "node_modules/compress-brotli": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/compress-brotli/-/compress-brotli-1.3.8.tgz", @@ -4167,27 +4133,15 @@ } }, "node_modules/convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/copyfiles": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", - "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/copyfiles": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.4.1.tgz", + "integrity": "sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg==", "dev": true, "dependencies": { "glob": "^7.0.5", @@ -4221,6 +4175,27 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "devOptional": true }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -4240,30 +4215,6 @@ "node": ">= 8" } }, - "node_modules/cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true - }, - "node_modules/cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dev": true, - "dependencies": { - "cssom": "~0.3.6" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cssstyle/node_modules/cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true - }, "node_modules/damerau-levenshtein": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", @@ -4279,20 +4230,6 @@ "node": ">=8" } }, - "node_modules/data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", - "dev": true, - "dependencies": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/dateformat": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", @@ -4329,30 +4266,6 @@ "node": "*" } }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", - "dev": true - }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/decomment": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/decomment/-/decomment-0.9.4.tgz", @@ -4391,6 +4304,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -4406,9 +4333,9 @@ "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true, "engines": { "node": ">=0.10.0" @@ -4456,19 +4383,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -4698,12 +4612,12 @@ } }, "node_modules/diff-sequences": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", - "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/dir-glob": { @@ -4729,37 +4643,15 @@ "node": ">=6.0.0" } }, - "node_modules/domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", - "dev": true, - "dependencies": { - "webidl-conversions": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/domexception/node_modules/webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "node_modules/ejs": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", - "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", - "dev": true, + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "dependencies": { "jake": "^10.8.5" }, @@ -4795,19 +4687,34 @@ "ejslint": "cli.js" } }, + "node_modules/ejs-lint/node_modules/ejs": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", + "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", + "dev": true, + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/electron-to-chromium": { - "version": "1.3.727", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", - "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", + "version": "1.4.802", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.802.tgz", + "integrity": "sha512-TnTMUATbgNdPXVSHsxvNVSG0uEd6cSZsANjm8c9HbvflZVVn1yTRcmVXYT1Ma95/ssB/Dcd30AHweH2TE+dNpA==", "dev": true }, "node_modules/emittery": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", - "integrity": "sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sindresorhus/emittery?sponsor=1" @@ -4848,9 +4755,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", - "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", + "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -4938,9 +4845,9 @@ } }, "node_modules/es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz", + "integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==", "dev": true, "peer": true }, @@ -4972,9 +4879,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -5462,9 +5369,9 @@ } }, "node_modules/eslint-plugin-react/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "peer": true, "bin": { @@ -5652,26 +5559,19 @@ "node": ">=0.8.x" } }, - "node_modules/exec-sh": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz", - "integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==", - "dev": true - }, "node_modules/execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", - "dev": true, + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dependencies": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" }, "engines": { @@ -5681,351 +5581,159 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/execa/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true, "engines": { "node": ">= 0.8.0" } }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": ">=0.10.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/expand-brackets/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "devOptional": true, "dependencies": { - "is-descriptor": "^0.1.0" + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/expand-brackets/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dependencies": { - "is-extendable": "^0.1.0" + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" }, "engines": { - "node": ">=0.10.0" + "node": ">=8.6.0" } }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" + "reusify": "^1.0.4" } }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" + "bser": "2.1.1" } }, - "node_modules/expand-brackets/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "devOptional": true, "dependencies": { - "kind-of": "^3.0.2" + "escape-string-regexp": "^1.0.5" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "devOptional": true, "engines": { - "node": ">=0.10.0" + "node": ">=0.8.0" } }, - "node_modules/expand-brackets/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=0.10.0" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/expand-brackets/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/expect": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", - "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", - "dev": true, - "dependencies": { - "@jest/types": "^26.6.2", - "ansi-styles": "^4.0.0", - "jest-get-type": "^26.3.0", - "jest-matcher-utils": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-regex-util": "^26.0.0" - }, - "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/exponential-backoff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", - "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" - }, - "node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "devOptional": true, - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fb-watchman": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", - "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", - "dev": true, - "dependencies": { - "bser": "2.1.1" - } - }, - "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "devOptional": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/figures/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "devOptional": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dependencies": { - "minimatch": "^5.0.1" + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dependencies": { + "minimatch": "^5.0.1" } }, "node_modules/filelist/node_modules/brace-expansion": { @@ -6094,9 +5802,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -6212,15 +5920,6 @@ "deprecated": "flatten is deprecated in favor of utility frameworks such as lodash.", "dev": true }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/foreground-child": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", @@ -6261,18 +5960,6 @@ "node": ">= 6" } }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -6290,9 +5977,9 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -6452,15 +6139,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/github-username": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/github-username/-/github-username-6.0.0.tgz", @@ -6505,6 +6183,13 @@ "node": ">= 6" } }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "peer": true + }, "node_modules/globals": { "version": "13.8.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", @@ -6587,9 +6272,9 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/graphviz": { "version": "0.0.9", @@ -6613,13 +6298,6 @@ "node": ">=8.0.0" } }, - "node_modules/growly": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", - "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", - "dev": true, - "optional": true - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -6692,86 +6370,11 @@ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" }, - "node_modules/has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" }, - "node_modules/html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", - "dev": true, - "dependencies": { - "whatwg-encoding": "^1.0.5" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -6788,6 +6391,7 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "devOptional": true, + "peer": true, "dependencies": { "@tootallnate/once": "1", "agent-base": "6", @@ -6822,12 +6426,11 @@ } }, "node_modules/human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "engines": { - "node": ">=8.12.0" + "node": ">=10.17.0" } }, "node_modules/humanize-ms": { @@ -6909,9 +6512,9 @@ } }, "node_modules/import-local": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", - "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, "dependencies": { "pkg-dir": "^4.2.0", @@ -6922,8 +6525,11 @@ }, "engines": { "node": ">=8" - } - }, + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/import-local/node_modules/pkg-dir": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", @@ -7029,23 +6635,23 @@ "node": ">= 0.10" } }, - "node_modules/ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" - }, - "node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", "dependencies": { - "kind-of": "^6.0.0" + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" }, "engines": { - "node": ">=0.10.0" + "node": ">= 12" } }, + "node_modules/ip-address/node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -7079,12 +6685,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, "node_modules/is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -7097,18 +6697,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, "node_modules/is-core-module": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", @@ -7120,18 +6708,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-date-object": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", @@ -7144,48 +6720,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "optional": true, - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -7288,24 +6822,6 @@ "node": ">=8" } }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true - }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -7400,12 +6916,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -7443,28 +6953,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "optional": true, - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -7487,66 +6975,49 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", "dev": true, "dependencies": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" }, "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "node": ">=10" } }, "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "dependencies": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, "dependencies": { "debug": "^4.1.1", @@ -7554,13 +7025,13 @@ "source-map": "^0.6.1" }, "engines": { - "node": ">=8" + "node": ">=10" } }, "node_modules/istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -7605,727 +7076,741 @@ } }, "node_modules/jest": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", - "integrity": "sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "dependencies": { - "@jest/core": "^26.6.3", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^26.6.3" + "jest-cli": "^29.7.0" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, "node_modules/jest-changed-files": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.2.tgz", - "integrity": "sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-changed-files/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", - "execa": "^4.0.0", - "throat": "^5.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">= 10.14.2" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/jest-cli": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz", - "integrity": "sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "dependencies": { - "@jest/core": "^26.6.3", - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", "import-local": "^3.0.2", - "is-ci": "^2.0.0", - "jest-config": "^26.6.3", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "prompts": "^2.0.1", - "yargs": "^15.4.1" + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" }, "bin": { "jest": "bin/jest.js" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, "node_modules/jest-cli/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/jest-cli/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" } }, - "node_modules/jest-cli/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, "node_modules/jest-cli/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/jest-cli/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, "engines": { - "node": ">=6" + "node": ">=12" } }, "node_modules/jest-config": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.3.tgz", - "integrity": "sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "dependencies": { - "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.6.3", - "@jest/types": "^26.6.2", - "babel-jest": "^26.6.3", + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", + "ci-info": "^3.2.0", "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.6.2", - "jest-environment-node": "^26.6.2", - "jest-get-type": "^26.3.0", - "jest-jasmine2": "^26.6.3", - "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.6.2", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "micromatch": "^4.0.2", - "pretty-format": "^26.6.2" + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "peerDependencies": { + "@types/node": "*", "ts-node": ">=9.0.0" }, "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, "ts-node": { "optional": true } } }, - "node_modules/jest-diff": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", - "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", + "node_modules/jest-config/node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { - "node": ">= 10.14.2" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-docblock": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-26.0.0.tgz", - "integrity": "sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w==", + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "dependencies": { - "detect-newline": "^3.0.0" + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-each": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.2.tgz", - "integrity": "sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==", + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", - "chalk": "^4.0.0", - "jest-get-type": "^26.3.0", - "jest-util": "^26.6.2", - "pretty-format": "^26.6.2" + "detect-newline": "^3.0.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-environment-jsdom": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz", - "integrity": "sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==", + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "dependencies": { - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2", - "jsdom": "^16.4.0" + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-environment-node": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz", - "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "dependencies": { - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-get-type": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", - "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-haste-map": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", - "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", - "@types/graceful-fs": "^4.1.2", + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^26.0.0", - "jest-serializer": "^26.6.2", - "jest-util": "^26.6.2", - "jest-worker": "^26.6.2", - "micromatch": "^4.0.2", - "sane": "^4.0.3", - "walker": "^1.0.7" + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, "optionalDependencies": { - "fsevents": "^2.1.2" - } - }, - "node_modules/jest-jasmine2": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz", - "integrity": "sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==", - "dev": true, - "dependencies": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.6.2", - "@jest/source-map": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^26.6.2", - "is-generator-fn": "^2.0.0", - "jest-each": "^26.6.2", - "jest-matcher-utils": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-runtime": "^26.6.3", - "jest-snapshot": "^26.6.2", - "jest-util": "^26.6.2", - "pretty-format": "^26.6.2", - "throat": "^5.0.0" - }, - "engines": { - "node": ">= 10.14.2" + "fsevents": "^2.3.2" } }, "node_modules/jest-json-schema": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/jest-json-schema/-/jest-json-schema-5.0.0.tgz", - "integrity": "sha512-AggSUrNDSGndFQJAvrAHQzW9P/4tu9bnCIlvyzcOszgk8By1EU1bNP15TA38/4YekDgac49GniInpa0HsIbAjA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jest-json-schema/-/jest-json-schema-6.1.0.tgz", + "integrity": "sha512-LMHuLmKjr/4X+H8v1xF5TEwfYEkzwGeWJ0epYQVQhlVTDDR5FWCdSO8vmsecb5cLf9NeWAqMKn3qhJvP9um0AA==", "dev": true, "dependencies": { - "ajv": "^6.10.2", - "chalk": "^4.1.0", - "jest-matcher-utils": "^26.6.1" + "ajv": "^8.8.2", + "ajv-formats": "^2.1.1", + "chalk": "^4.1.2", + "jest-matcher-utils": "^27.3.1" }, "engines": { "node": "^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-leak-detector": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz", - "integrity": "sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==", + "node_modules/jest-json-schema/node_modules/ajv": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dev": true, "dependencies": { - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" }, - "engines": { - "node": ">= 10.14.2" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/jest-matcher-utils": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", - "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", + "node_modules/jest-json-schema/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" - }, "engines": { - "node": ">= 10.14.2" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/jest-message-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", - "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", + "node_modules/jest-json-schema/node_modules/diff-sequences": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", + "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.6.2", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "micromatch": "^4.0.2", - "pretty-format": "^26.6.2", - "slash": "^3.0.0", - "stack-utils": "^2.0.2" - }, "engines": { - "node": ">= 10.14.2" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-mock": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz", - "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==", + "node_modules/jest-json-schema/node_modules/jest-diff": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", - "@types/node": "*" + "chalk": "^4.0.0", + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { - "node": ">= 10.14.2" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-regex-util": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", - "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", + "node_modules/jest-json-schema/node_modules/jest-get-type": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", "dev": true, "engines": { - "node": ">= 10.14.2" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-resolve": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz", - "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==", + "node_modules/jest-json-schema/node_modules/jest-matcher-utils": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^26.6.2", - "read-pkg-up": "^7.0.1", - "resolve": "^1.18.1", - "slash": "^3.0.0" + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" }, "engines": { - "node": ">= 10.14.2" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-resolve-dependencies": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz", - "integrity": "sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==", + "node_modules/jest-json-schema/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/jest-json-schema/node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-snapshot": "^26.6.2" + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" }, "engines": { - "node": ">= 10.14.2" + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/jest-resolve/node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", "dev": true, "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "engines": { - "node": ">=8" + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-resolve/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "node_modules/jest-message-util/node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, "engines": { - "node": ">=8" + "node": ">=6.9.0" } }, - "node_modules/jest-runner": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz", - "integrity": "sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==", + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", "dev": true, "dependencies": { - "@jest/console": "^26.6.2", - "@jest/environment": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/types": "^29.6.3", "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.7.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-config": "^26.6.3", - "jest-docblock": "^26.0.0", - "jest-haste-map": "^26.6.2", - "jest-leak-detector": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-resolve": "^26.6.2", - "jest-runtime": "^26.6.3", - "jest-util": "^26.6.2", - "jest-worker": "^26.6.2", - "source-map-support": "^0.5.6", - "throat": "^5.0.0" + "jest-util": "^29.7.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz", - "integrity": "sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==", - "dev": true, - "dependencies": { - "@jest/console": "^26.6.2", - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/globals": "^26.6.2", - "@jest/source-map": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/yargs": "^15.0.0", - "chalk": "^4.0.0", - "cjs-module-lexer": "^0.6.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-config": "^26.6.3", - "jest-haste-map": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-mock": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.6.2", - "jest-snapshot": "^26.6.2", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "slash": "^3.0.0", - "strip-bom": "^4.0.0", - "yargs": "^15.4.1" + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" }, - "bin": { - "jest-runtime": "bin/jest-runtime.js" + "peerDependencies": { + "jest-resolve": "*" }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", "dev": true, "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/jest-runtime/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", "dev": true, "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "node_modules/jest-runner/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-serializer": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", - "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==", + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "graceful-fs": "^4.2.4" + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-snapshot": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.2.tgz", - "integrity": "sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "dependencies": { - "@babel/types": "^7.0.0", - "@jest/types": "^26.6.2", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.0.0", + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^26.6.2", - "graceful-fs": "^4.2.4", - "jest-diff": "^26.6.2", - "jest-get-type": "^26.3.0", - "jest-haste-map": "^26.6.2", - "jest-matcher-utils": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-resolve": "^26.6.2", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^26.6.2", - "semver": "^7.3.2" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-validate": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz", - "integrity": "sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", - "camelcase": "^6.0.0", + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^26.3.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^26.6.2" + "pretty-format": "^29.7.0" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, "engines": { "node": ">=10" @@ -8335,35 +7820,52 @@ } }, "node_modules/jest-watcher": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.2.tgz", - "integrity": "sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "dependencies": { - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^26.6.2", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" }, "engines": { - "node": ">= 10.14.2" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "dependencies": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" + "supports-color": "^8.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/js-tokens": { @@ -8382,63 +7884,10 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", - "dev": true, - "dependencies": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "canvas": "^2.5.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, - "node_modules/jsdom/node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" }, "node_modules/jsesc": { "version": "2.5.2", @@ -8561,15 +8010,6 @@ "json-buffer": "3.0.1" } }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -8745,6 +8185,12 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, "node_modules/lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", @@ -8792,6 +8238,8 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "devOptional": true, + "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -8853,29 +8301,20 @@ } }, "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "semver": "^7.5.3" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -8911,33 +8350,12 @@ } }, "node_modules/makeerror": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", - "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, "dependencies": { - "tmpl": "1.0.x" - } - }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" + "tmpl": "1.0.5" } }, "node_modules/mem-fs": { @@ -8984,20 +8402,6 @@ } } }, - "node_modules/mem-fs-editor/node_modules/ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -9170,19 +8574,6 @@ "node": ">= 8" } }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -9280,10 +8671,16 @@ "devOptional": true }, "node_modules/nanoid": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", - "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -9291,28 +8688,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -9334,12 +8709,6 @@ "dev": true, "peer": true }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "node_modules/nise": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", @@ -9515,37 +8884,13 @@ "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, - "node_modules/node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/node-notifier": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz", - "integrity": "sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg==", - "dev": true, - "optional": true, - "dependencies": { - "growly": "^1.3.0", - "is-wsl": "^2.2.0", - "semver": "^7.3.2", - "shellwords": "^0.1.1", - "uuid": "^8.3.0", - "which": "^2.0.2" - } - }, "node_modules/node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/node-source-walk": { @@ -9598,9 +8943,9 @@ } }, "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "bin": { "semver": "bin/semver" } @@ -9993,12 +9338,6 @@ "set-blocking": "^2.0.0" } }, - "node_modules/nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", - "dev": true - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -10009,91 +9348,6 @@ "node": ">=0.10.0" } }, - "node_modules/object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-inspect": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", @@ -10112,18 +9366,6 @@ "node": ">= 0.4" } }, - "node_modules/object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "dependencies": { - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -10188,18 +9430,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object.values": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", @@ -10296,23 +9526,12 @@ "node": ">=8" } }, - "node_modules/p-each-series": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", - "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "devOptional": true, + "peer": true, "engines": { "node": ">=4" } @@ -10490,21 +9709,6 @@ "node": ">=6" } }, - "node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "node_modules/pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -10582,6 +9786,11 @@ "node": ">=8" } }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + }, "node_modules/picomatch": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", @@ -10603,13 +9812,10 @@ } }, "node_modules/pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", "dev": true, - "dependencies": { - "node-modules-regexp": "^1.0.0" - }, "engines": { "node": ">= 6" } @@ -10702,31 +9908,32 @@ "node": ">=4" } }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/postcss": { - "version": "8.2.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.14.tgz", - "integrity": "sha512-+jD0ZijcvyCqPQo/m/CW0UcARpdFylq04of+Q7RKX6f/Tu+dvpUI/9Sp81+i6/vJThnOBX09Quw0ZLOVwpzX3w==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "dependencies": { - "colorette": "^1.2.2", - "nanoid": "^3.1.22", - "source-map": "^0.6.1" + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" }, "engines": { "node": "^10 || ^12 || >=14" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" } }, "node_modules/postcss-values-parser": { @@ -10932,20 +10139,37 @@ } }, "node_modules/pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "dependencies": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" }, "engines": { - "node": ">= 10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/pretty-format/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + }, "node_modules/pretty-ms": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", @@ -11021,9 +10245,9 @@ } }, "node_modules/prompts": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", - "integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, "dependencies": { "kleur": "^3.0.3", @@ -11052,12 +10276,6 @@ "dev": true, "peer": true }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -11076,6 +10294,22 @@ "node": ">=6" } }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -11159,7 +10393,7 @@ "node_modules/read-input": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/read-input/-/read-input-0.3.1.tgz", - "integrity": "sha1-WzFpMIATRk/9puyS5Y0tPOqUjfE=", + "integrity": "sha512-J1ZkWCnB4altU7RTe+62PSfa21FrEtfKyO9fuqR3yP8kZku3nIwaw2Krj383JC7egAIl5Zyz2w+EOu9uXH5HZw==", "dev": true }, "node_modules/read-package-json": { @@ -11440,19 +10674,6 @@ "dev": true, "peer": true }, - "node_modules/regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/regexp.prototype.flags": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", @@ -11486,25 +10707,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "devOptional": true - }, - "node_modules/repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true, - "engines": { - "node": ">=0.10" - } + "devOptional": true, + "peer": true }, "node_modules/replace-ext": { "version": "1.0.1", @@ -11534,12 +10738,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "node_modules/requirejs": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz", @@ -11622,12 +10820,14 @@ "node": ">=4" } }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "deprecated": "https://github.com/lydell/resolve-url#deprecated", - "dev": true + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } }, "node_modules/responselike": { "version": "2.0.0", @@ -11650,15 +10850,6 @@ "node": ">=8" } }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "engines": { - "node": ">=0.12" - } - }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", @@ -11690,15 +10881,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rsvp": { - "version": "4.8.5", - "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", - "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", - "dev": true, - "engines": { - "node": "6.* || >= 7.*" - } - }, "node_modules/run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -11747,319 +10929,16 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "devOptional": true }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "dependencies": { - "ret": "~0.1.10" - } - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "devOptional": true }, - "node_modules/sane": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", - "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", - "deprecated": "some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added", - "dev": true, - "dependencies": { - "@cnakazawa/watch": "^1.0.3", - "anymatch": "^2.0.0", - "capture-exit": "^2.0.0", - "exec-sh": "^0.3.2", - "execa": "^1.0.0", - "fb-watchman": "^2.0.0", - "micromatch": "^3.1.4", - "minimist": "^1.1.1", - "walker": "~1.0.5" - }, - "bin": { - "sane": "src/cli.js" - }, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/sane/node_modules/anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "dependencies": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "node_modules/sane/node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/sane/node_modules/execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/sane/node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/sane/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "dependencies": { - "path-key": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/sane/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/sane/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/sane/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sane/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/sass-lookup": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/sass-lookup/-/sass-lookup-3.0.0.tgz", - "integrity": "sha512-TTsus8CfFRn1N44bvdEai1no6PqdmDiQUiqW5DlpmtT+tYnIt1tXtDIph5KA1efC+LmioJXSnCtUVpcK9gaKIg==", + "node_modules/sass-lookup": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/sass-lookup/-/sass-lookup-3.0.0.tgz", + "integrity": "sha512-TTsus8CfFRn1N44bvdEai1no6PqdmDiQUiqW5DlpmtT+tYnIt1tXtDIph5KA1efC+LmioJXSnCtUVpcK9gaKIg==", "dev": true, "dependencies": { "commander": "^2.16.0" @@ -12077,22 +10956,10 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "node_modules/saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", - "dev": true, - "dependencies": { - "xmlchars": "^2.2.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "peer": true, "dependencies": { @@ -12119,12 +10986,9 @@ } }, "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", "bin": { "semver": "bin/semver.js" }, @@ -12133,9 +10997,9 @@ } }, "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "peer": true, "dependencies": { @@ -12147,42 +11011,6 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -12218,13 +11046,6 @@ "node": ">=4" } }, - "node_modules/shellwords": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", - "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", - "dev": true, - "optional": true - }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -12563,285 +11384,76 @@ "npm": ">= 3.0.0" } }, - "node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 10.0.0", + "npm": ">= 3.0.0" } }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, + "node_modules/socks-proxy-agent": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", + "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", + "devOptional": true, + "peer": true, "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 10" } }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, + "node_modules/sort-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-4.2.0.tgz", + "integrity": "sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg==", "dependencies": { - "is-descriptor": "^1.0.0" + "is-plain-obj": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, - "dependencies": { - "kind-of": "^3.2.0" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/snapdragon/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/snapdragon/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", - "dependencies": { - "ip": "^2.0.0", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", - "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", - "devOptional": true, - "peer": true, - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/sort-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-4.2.0.tgz", - "integrity": "sha512-aUYIEU/UviqPgc8mHR6IW1EGxkAXpeRETYcrzg8cLAvUPZcpAlleSXHV2mY7G12GphSH6Gzv+4MMVSSkbdteHg==", - "dependencies": { - "is-plain-obj": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", - "dev": true, - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, - "node_modules/source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "deprecated": "See https://github.com/lydell/source-map-url#deprecated", - "dev": true - }, "node_modules/spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -12870,18 +11482,6 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==" }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "dependencies": { - "extend-shallow": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -12902,9 +11502,9 @@ } }, "node_modules/stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "dependencies": { "escape-string-regexp": "^2.0.0" @@ -12913,102 +11513,6 @@ "node": ">=10" } }, - "node_modules/static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", @@ -13189,15 +11693,6 @@ "node": ">=0.10.0" } }, - "node_modules/strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -13251,19 +11746,6 @@ "node": ">=8" } }, - "node_modules/supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -13277,12 +11759,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, "node_modules/syntax-error": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", @@ -13341,13 +11817,13 @@ } }, "node_modules/tar": { - "version": "6.1.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", - "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", + "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" @@ -13357,12 +11833,9 @@ } }, "node_modules/tar/node_modules/minipass": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", - "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", - "dependencies": { - "yallist": "^4.0.0" - }, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "engines": { "node": ">=8" } @@ -13376,31 +11849,15 @@ "node >=0.4.0" ] }, - "node_modules/terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.31.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz", + "integrity": "sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==", "dev": true, "peer": true, "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -13412,17 +11869,17 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", - "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "peer": true, "dependencies": { - "@jridgewell/trace-mapping": "^0.3.7", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.7.2" + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -13478,9 +11935,9 @@ } }, "node_modules/terser/node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "peer": true, "bin": { @@ -13527,12 +11984,6 @@ "url": "https://bevry.me/fund" } }, - "node_modules/throat": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", - "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", - "dev": true - }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -13600,86 +12051,21 @@ "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, "engines": { "node": ">=4" } }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dependencies": { - "kind-of": "^3.0.2" + "is-number": "^7.0.0" }, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", - "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "dev": true, - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=8" + "node": ">=8.0" } }, "node_modules/treeverse": { @@ -13690,31 +12076,59 @@ "peer": true }, "node_modules/ts-jest": { - "version": "26.5.6", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.6.tgz", - "integrity": "sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA==", + "version": "29.1.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.4.tgz", + "integrity": "sha512-YiHwDhSvCiItoAgsKtoLFCuakDzDsJ1DLDnSouTaTmdOcOwIkSzbLXduaQ6M5DRVhuZC/NYaaZ/mtHbWMv/S6Q==", "dev": true, "dependencies": { "bs-logger": "0.x", - "buffer-from": "1.x", "fast-json-stable-stringify": "2.x", - "jest-util": "^26.1.0", - "json5": "2.x", - "lodash": "4.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", "make-error": "1.x", - "mkdirp": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" }, "bin": { "ts-jest": "cli.js" }, "engines": { - "node": ">= 10" + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { - "jest": ">=26 <27", - "typescript": ">=3.8 <5.0" + "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", + "@jest/types": "^29.0.0", + "babel-jest": "^29.0.0", + "jest": "^29.0.0", + "typescript": ">=4.3 <6" + }, + "peerDependenciesMeta": { + "@babel/core": { + "optional": true + }, + "@jest/transform": { + "optional": true + }, + "@jest/types": { + "optional": true + }, + "babel-jest": { + "optional": true + }, + "esbuild": { + "optional": true + } + } + }, + "node_modules/ts-jest/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" } }, "node_modules/ts-loader": { @@ -14105,19 +12519,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", - "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -14142,30 +12547,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/union-value/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", @@ -14197,69 +12578,6 @@ "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, "node_modules/untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", @@ -14269,6 +12587,36 @@ "node": ">=8" } }, + "node_modules/update-browserslist-db": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -14278,37 +12626,11 @@ "punycode": "^2.1.0" } }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "deprecated": "Please see https://github.com/lydell/urix#deprecated", - "dev": true - }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "optional": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", @@ -14316,26 +12638,17 @@ "dev": true }, "node_modules/v8-to-istanbul": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", - "integrity": "sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" + "convert-source-map": "^2.0.0" }, "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/v8-to-istanbul/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true, - "engines": { - "node": ">= 8" + "node": ">=10.12.0" } }, "node_modules/validate-npm-package-license": { @@ -14429,27 +12742,6 @@ "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==", "dev": true }, - "node_modules/w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "dev": true, - "dependencies": { - "browser-process-hrtime": "^1.0.0" - } - }, - "node_modules/w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", - "dev": true, - "dependencies": { - "xml-name-validator": "^3.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/walk-up-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz", @@ -14467,18 +12759,18 @@ } }, "node_modules/walker": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", - "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, "dependencies": { - "makeerror": "1.0.x" + "makeerror": "1.0.12" } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", "dev": true, "peer": true, "dependencies": { @@ -14489,13 +12781,6 @@ "node": ">=10.13.0" } }, - "node_modules/watchpack/node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "peer": true - }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -14505,45 +12790,36 @@ "defaults": "^1.0.3" } }, - "node_modules/webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "dev": true, - "engines": { - "node": ">=10.4" - } - }, "node_modules/webpack": { - "version": "5.73.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz", - "integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==", + "version": "5.92.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.0.tgz", + "integrity": "sha512-Bsw2X39MYIgxouNATyVpCNVWBCuUwDgWtN78g6lSdPJRLaQ/PUVm/oXcaRAyY/sMFoKFQrsPeqvTizWtq7QPCA==", "dev": true, "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.7.1", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.9.3", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.17.0", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.3.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -14573,9 +12849,9 @@ } }, "node_modules/webpack/node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "peer": true, "bin": { @@ -14585,52 +12861,16 @@ "node": ">=0.4.0" } }, - "node_modules/webpack/node_modules/acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "node_modules/webpack/node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "dev": true, "peer": true, "peerDependencies": { "acorn": "^8" } }, - "node_modules/webpack/node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "peer": true - }, - "node_modules/whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", - "dev": true, - "dependencies": { - "iconv-lite": "0.4.24" - } - }, - "node_modules/whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true - }, - "node_modules/whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", - "dev": true, - "dependencies": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -14661,12 +12901,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, "node_modules/which-pm": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.0.0.tgz", @@ -14690,9 +12924,9 @@ } }, "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -14738,50 +12972,18 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "devOptional": true, "dependencies": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "node_modules/ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" + "signal-exit": "^3.0.7" }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true - }, - "node_modules/xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true - }, "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -14920,68 +13122,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yeoman-environment/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "node_modules/yeoman-environment/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "devOptional": true, "peer": true, "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/yeoman-environment/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "devOptional": true, - "peer": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yeoman-environment/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "devOptional": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yeoman-environment/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "devOptional": true, - "peer": true, - "engines": { - "node": ">=10.17.0" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/yeoman-environment/node_modules/inquirer": { @@ -15290,28 +13445,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/yeoman-generator/node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, "node_modules/yeoman-generator/node_modules/fs-minipass": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", @@ -15349,17 +13482,6 @@ "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/yeoman-generator/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/yeoman-generator/node_modules/hosted-git-info": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", @@ -15384,14 +13506,6 @@ "node": ">= 6" } }, - "node_modules/yeoman-generator/node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "engines": { - "node": ">=10.17.0" - } - }, "node_modules/yeoman-generator/node_modules/ignore-walk": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.3.tgz", @@ -16111,7 +14225,6 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "devOptional": true, - "peer": true, "engines": { "node": ">=10" }, @@ -16121,6 +14234,16 @@ } }, "dependencies": { + "@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, "@babel/code-frame": { "version": "7.12.11", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", @@ -16130,225 +14253,212 @@ } }, "@babel/compat-data": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz", - "integrity": "sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", "dev": true }, "@babel/core": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.0.tgz", - "integrity": "sha512-8YqpRig5NmIHlMLw09zMlPTvUVMILjqCOtVgu+TVNWEBvy9b5I3RRyhqnrV4hjgEK7n8P9OqvkWJAFmEL6Wwfw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.14.0", - "@babel/helper-compilation-targets": "^7.13.16", - "@babel/helper-module-transforms": "^7.14.0", - "@babel/helpers": "^7.14.0", - "@babel/parser": "^7.14.0", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.14.0", - "@babel/types": "^7.14.0", - "convert-source-map": "^1.7.0", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "dependencies": { "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "requires": { - "@babel/highlight": "^7.12.13" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } }, "@babel/generator": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz", - "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", "dev": true, "requires": { - "@babel/types": "^7.14.1", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" } }, "@babel/helper-compilation-targets": { - "version": "7.13.16", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", - "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", "dev": true, "requires": { - "@babel/compat-data": "^7.13.15", - "@babel/helper-validator-option": "^7.12.17", - "browserslist": "^4.14.5", - "semver": "^6.3.0" + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", "dev": true } } }, - "@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.12.13", - "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" + "@babel/types": "^7.24.7" } }, - "@babel/helper-get-function-arity": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", - "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", "dev": true, "requires": { - "@babel/types": "^7.12.13" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" } }, - "@babel/helper-member-expression-to-functions": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", - "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", + "@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", "dev": true, "requires": { - "@babel/types": "^7.13.12" + "@babel/types": "^7.24.7" } }, "@babel/helper-module-imports": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", - "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", "dev": true, "requires": { - "@babel/types": "^7.13.12" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, "@babel/helper-module-transforms": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.0.tgz", - "integrity": "sha512-L40t9bxIuGOfpIGA3HNkJhU9qYrf4y5A5LUSw7rGMSn+pcG8dfJ0g6Zval6YJGd2nEjI7oP00fRdnhLKndx6bw==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.13.12", - "@babel/helper-replace-supers": "^7.13.12", - "@babel/helper-simple-access": "^7.13.12", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.14.0", - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.14.0", - "@babel/types": "^7.14.0" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", - "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", "dev": true, "requires": { - "@babel/types": "^7.12.13" + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" } }, "@babel/helper-plugin-utils": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", - "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", + "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", "dev": true }, - "@babel/helper-replace-supers": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", - "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.13.12", - "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.12" - } - }, "@babel/helper-simple-access": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", - "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", "dev": true, "requires": { - "@babel/types": "^7.13.12" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, "@babel/helper-split-export-declaration": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", - "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", "dev": true, "requires": { - "@babel/types": "^7.12.13" + "@babel/types": "^7.24.7" } }, + "@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "dev": true + }, "@babel/helper-validator-identifier": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", - "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==" + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==" }, "@babel/helper-validator-option": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", - "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", "dev": true }, "@babel/helpers": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz", - "integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", "dev": true, "requires": { - "@babel/template": "^7.12.13", - "@babel/traverse": "^7.14.0", - "@babel/types": "^7.14.0" + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" } }, "@babel/highlight": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", - "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "requires": { - "@babel/helper-validator-identifier": "^7.14.0", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "dependencies": { "ansi-styles": { @@ -16403,9 +14513,9 @@ } }, "@babel/parser": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.1.tgz", - "integrity": "sha512-muUGEKu8E/ftMTPlNp+mc6zL3E9zKWmF5sDHZ5MSsoTP9Wyz64AhEf9kD08xYJ7w6Hdcu8H550ircnPyWSIF0Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -16453,6 +14563,15 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-jsx": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz", + "integrity": "sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.24.7" + } + }, "@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", @@ -16508,12 +14627,21 @@ } }, "@babel/plugin-syntax-top-level-await": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", - "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.12.13" + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", + "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.24.7" } }, "@babel/runtime": { @@ -16538,50 +14666,54 @@ } }, "@babel/template": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", - "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", "dev": true, "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/parser": "^7.12.13", - "@babel/types": "^7.12.13" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" }, "dependencies": { "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "requires": { - "@babel/highlight": "^7.12.13" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" } } } }, "@babel/traverse": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.0.tgz", - "integrity": "sha512-dZ/a371EE5XNhTHomvtuLTUyx6UEoJmYX+DT5zBCQN3McHemsuIaKKYqsc/fs26BEkHs/lBZy0J571LP5z9kQA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.14.0", - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.14.0", - "@babel/types": "^7.14.0", - "debug": "^4.1.0", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", "globals": "^11.1.0" }, "dependencies": { "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "requires": { - "@babel/highlight": "^7.12.13" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" } }, "globals": { @@ -16593,12 +14725,13 @@ } }, "@babel/types": { - "version": "7.14.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz", - "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.0", + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" } }, @@ -16608,16 +14741,6 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "@cnakazawa/watch": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", - "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", - "dev": true, - "requires": { - "exec-sh": "^0.3.2", - "minimist": "^1.2.0" - } - }, "@eslint/eslintrc": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.1.tgz", @@ -16788,250 +14911,293 @@ "dev": true }, "@jest/console": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.2.tgz", - "integrity": "sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", "dev": true, "requires": { - "@jest/types": "^26.6.2", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^26.6.2", - "jest-util": "^26.6.2", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "slash": "^3.0.0" } }, "@jest/core": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", - "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", "dev": true, "requires": { - "@jest/console": "^26.6.2", - "@jest/reporters": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", + "ci-info": "^3.2.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.6.2", - "jest-config": "^26.6.3", - "jest-haste-map": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.6.2", - "jest-resolve-dependencies": "^26.6.3", - "jest-runner": "^26.6.3", - "jest-runtime": "^26.6.3", - "jest-snapshot": "^26.6.2", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "jest-watcher": "^26.6.2", - "micromatch": "^4.0.2", - "p-each-series": "^2.1.0", - "rimraf": "^3.0.0", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" } }, "@jest/environment": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", - "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", "dev": true, "requires": { - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^26.6.2" + "jest-mock": "^29.7.0" + } + }, + "@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "requires": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + } + }, + "@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "requires": { + "jest-get-type": "^29.6.3" } }, "@jest/fake-timers": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", - "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", "dev": true, "requires": { - "@jest/types": "^26.6.2", - "@sinonjs/fake-timers": "^6.0.1", + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", "@types/node": "*", - "jest-message-util": "^26.6.2", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2" + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^3.0.0" + } + } } }, "@jest/globals": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.2.tgz", - "integrity": "sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", "dev": true, "requires": { - "@jest/environment": "^26.6.2", - "@jest/types": "^26.6.2", - "expect": "^26.6.2" + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" } }, "@jest/reporters": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz", - "integrity": "sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", - "glob": "^7.1.2", - "graceful-fs": "^4.2.4", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-instrument": "^6.0.0", "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.6.2", - "jest-resolve": "^26.6.2", - "jest-util": "^26.6.2", - "jest-worker": "^26.6.2", - "node-notifier": "^8.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", "slash": "^3.0.0", - "source-map": "^0.6.0", "string-length": "^4.0.1", - "terminal-link": "^2.0.0", - "v8-to-istanbul": "^7.0.0" + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + } + }, + "@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.27.8" } }, "@jest/source-map": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", - "integrity": "sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", "dev": true, "requires": { + "@jridgewell/trace-mapping": "^0.3.18", "callsites": "^3.0.0", - "graceful-fs": "^4.2.4", - "source-map": "^0.6.0" + "graceful-fs": "^4.2.9" } }, "@jest/test-result": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.2.tgz", - "integrity": "sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", "dev": true, "requires": { - "@jest/console": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" } }, "@jest/test-sequencer": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz", - "integrity": "sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", "dev": true, "requires": { - "@jest/test-result": "^26.6.2", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.6.2", - "jest-runner": "^26.6.3", - "jest-runtime": "^26.6.3" + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" } }, "@jest/transform": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.2.tgz", - "integrity": "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", "dev": true, "requires": { - "@babel/core": "^7.1.0", - "@jest/types": "^26.6.2", - "babel-plugin-istanbul": "^6.0.0", + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", "chalk": "^4.0.0", - "convert-source-map": "^1.4.0", - "fast-json-stable-stringify": "^2.0.0", - "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-util": "^26.6.2", - "micromatch": "^4.0.2", - "pirates": "^4.0.1", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", "slash": "^3.0.0", - "source-map": "^0.6.1", - "write-file-atomic": "^3.0.0" + "write-file-atomic": "^4.0.2" } }, "@jest/types": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", - "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", "dev": true, "requires": { + "@jest/schemas": "^29.6.3", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^3.0.0", "@types/node": "*", - "@types/yargs": "^15.0.0", + "@types/yargs": "^17.0.8", "chalk": "^4.0.0" } }, "@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, - "peer": true, "requires": { - "@jridgewell/set-array": "^1.0.0", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" } }, "@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", - "dev": true, - "peer": true + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true }, "@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", - "dev": true, - "peer": true + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true }, "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "peer": true, "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", - "dev": true, - "peer": true + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, - "peer": true, "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@nodelib/fs.scandir": { @@ -17606,6 +15772,12 @@ "tuf-js": "^1.1.7" } }, + "@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, "@sindresorhus/is": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.1.tgz", @@ -17658,7 +15830,8 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "devOptional": true + "devOptional": true, + "peer": true }, "@tufjs/canonical-json": { "version": "1.0.0", @@ -17693,31 +15866,31 @@ } }, "@types/babel__core": { - "version": "7.1.14", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz", - "integrity": "sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", "@types/babel__generator": "*", "@types/babel__template": "*", "@types/babel__traverse": "*" } }, "@types/babel__generator": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", - "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, "requires": { "@babel/types": "^7.0.0" } }, "@types/babel__template": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", - "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "requires": { "@babel/parser": "^7.1.0", @@ -17725,12 +15898,12 @@ } }, "@types/babel__traverse": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.1.tgz", - "integrity": "sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==", + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", "dev": true, "requires": { - "@babel/types": "^7.3.0" + "@babel/types": "^7.20.7" } }, "@types/cacheable-request": { @@ -17785,9 +15958,9 @@ } }, "@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true, "peer": true }, @@ -17808,9 +15981,9 @@ } }, "@types/graceful-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", - "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "requires": { "@types/node": "*" @@ -18044,12 +16217,6 @@ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==" }, - "@types/prettier": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.2.3.tgz", - "integrity": "sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA==", - "dev": true - }, "@types/responselike": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", @@ -18059,9 +16226,9 @@ } }, "@types/stack-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", - "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, "@types/text-table": { @@ -18090,9 +16257,9 @@ } }, "@types/yargs": { - "version": "15.0.13", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz", - "integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==", + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -18218,73 +16385,73 @@ } }, "@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "peer": true, "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true, "peer": true }, "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true, "peer": true }, "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true, "peer": true }, "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "peer": true, "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true, "peer": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "peer": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" } }, "@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "peer": true, "requires": { @@ -18292,9 +16459,9 @@ } }, "@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "peer": true, "requires": { @@ -18302,79 +16469,79 @@ } }, "@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true, "peer": true }, "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "peer": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "peer": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "peer": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "peer": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "peer": true, "requires": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -18392,12 +16559,6 @@ "dev": true, "peer": true }, - "abab": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", - "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", - "dev": true - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -18409,16 +16570,6 @@ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, - "acorn-globals": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", - "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", - "dev": true, - "requires": { - "acorn": "^7.1.1", - "acorn-walk": "^7.1.1" - } - }, "acorn-jsx": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", @@ -18482,6 +16633,35 @@ "uri-js": "^4.2.2" } }, + "ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "requires": { + "ajv": "^8.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -18527,9 +16707,9 @@ } }, "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "requires": { "normalize-path": "^3.0.0", @@ -18611,28 +16791,10 @@ "@babel/runtime-corejs3": "^7.10.2" } }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-differ": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==" + "array-differ": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", + "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==" }, "array-includes": { "version": "3.1.5", @@ -18652,12 +16814,6 @@ "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, "array.prototype.flat": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", @@ -18694,12 +16850,6 @@ "devOptional": true, "peer": true }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, "ast-module-types": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/ast-module-types/-/ast-module-types-2.7.1.tgz", @@ -18730,12 +16880,6 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, "axe-core": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.2.tgz", @@ -18751,43 +16895,63 @@ "peer": true }, "babel-jest": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", - "integrity": "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "requires": { - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/babel__core": "^7.1.7", - "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^26.6.2", + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", + "graceful-fs": "^4.2.9", "slash": "^3.0.0" } }, "babel-plugin-istanbul": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", - "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", "@istanbuljs/load-nyc-config": "^1.0.0", "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-instrument": "^5.0.4", "test-exclude": "^6.0.0" + }, + "dependencies": { + "istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } } }, "babel-plugin-jest-hoist": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz", - "integrity": "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "requires": { "@babel/template": "^7.3.3", "@babel/types": "^7.3.3", - "@types/babel__core": "^7.0.0", + "@types/babel__core": "^7.1.14", "@types/babel__traverse": "^7.0.6" } }, @@ -18812,12 +16976,12 @@ } }, "babel-preset-jest": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz", - "integrity": "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^26.6.2", + "babel-plugin-jest-hoist": "^29.6.3", "babel-preset-current-node-syntax": "^1.0.0" } }, @@ -18826,32 +16990,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -18884,17 +17022,6 @@ "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", "devOptional": true, "peer": true - }, - "write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "devOptional": true, - "peer": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - } } } }, @@ -18952,30 +17079,23 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, - "browser-process-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", - "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", - "dev": true - }, "browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" } }, "bs-logger": { @@ -19046,23 +17166,6 @@ "unique-filename": "^1.1.1" } }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, "cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -19105,24 +17208,15 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001223", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001223.tgz", - "integrity": "sha512-k/RYs6zc/fjbxTjaWZemeSmOjO0JJV+KguOBA3NwPup8uzxM1cMhR2BD9XmO86GuqaqTCO8CgkgH9Rz//vdDiA==", + "version": "1.0.30001633", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001633.tgz", + "integrity": "sha512-6sT0yf/z5jqf8tISAgpJDrmwOpLsrpnyCdD/lOZKvKkkJK4Dn0X5i7KF7THEZhOq+30bmhwBlNEaqPUiHiKtZg==", "dev": true }, - "capture-exit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", - "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", - "dev": true, - "requires": { - "rsvp": "^4.8.4" - } - }, "chalk": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", - "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -19153,97 +17247,17 @@ "peer": true }, "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true }, "cjs-module-lexer": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", - "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", + "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", "dev": true }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -19380,25 +17394,15 @@ "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true }, "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", "dev": true }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -19417,12 +17421,6 @@ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" }, - "colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true - }, "colors": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", @@ -19457,12 +17455,6 @@ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, "compress-brotli": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/compress-brotli/-/compress-brotli-1.3.8.tgz", @@ -19495,18 +17487,9 @@ "dev": true }, "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, "copyfiles": { @@ -19537,6 +17520,21 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "devOptional": true }, + "create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + } + }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -19553,29 +17551,6 @@ "which": "^2.0.1" } }, - "cssom": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", - "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", - "dev": true - }, - "cssstyle": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", - "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", - "dev": true, - "requires": { - "cssom": "~0.3.6" - }, - "dependencies": { - "cssom": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", - "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", - "dev": true - } - } - }, "damerau-levenshtein": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", @@ -19588,17 +17563,6 @@ "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==" }, - "data-urls": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", - "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", - "dev": true, - "requires": { - "abab": "^2.0.3", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.0.0" - } - }, "dateformat": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", @@ -19621,24 +17585,6 @@ "devOptional": true, "peer": true }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decimal.js": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", - "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true - }, "decomment": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/decomment/-/decomment-0.9.4.tgz", @@ -19663,6 +17609,13 @@ } } }, + "dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "requires": {} + }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -19675,9 +17628,9 @@ "dev": true }, "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, "defaults": { @@ -19712,16 +17665,6 @@ "object-keys": "^1.1.1" } }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -19896,9 +17839,9 @@ "dev": true }, "diff-sequences": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", - "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", "dev": true }, "dir-glob": { @@ -19918,33 +17861,15 @@ "esutils": "^2.0.2" } }, - "domexception": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", - "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", - "dev": true, - "requires": { - "webidl-conversions": "^5.0.0" - }, - "dependencies": { - "webidl-conversions": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", - "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", - "dev": true - } - } - }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" }, "ejs": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", - "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", - "dev": true, + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "requires": { "jake": "^10.8.5" } @@ -19969,18 +17894,29 @@ "slash": "^3.0.0", "syntax-error": "^1.1.6", "yargs": "^16.0.0" + }, + "dependencies": { + "ejs": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", + "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", + "dev": true, + "requires": { + "jake": "^10.8.5" + } + } } }, "electron-to-chromium": { - "version": "1.3.727", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz", - "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==", + "version": "1.4.802", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.802.tgz", + "integrity": "sha512-TnTMUATbgNdPXVSHsxvNVSG0uEd6cSZsANjm8c9HbvflZVVn1yTRcmVXYT1Ma95/ssB/Dcd30AHweH2TE+dNpA==", "dev": true }, "emittery": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", - "integrity": "sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==", + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true }, "emoji-regex": { @@ -20017,9 +17953,9 @@ } }, "enhanced-resolve": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", - "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", + "version": "5.17.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", + "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -20092,9 +18028,9 @@ } }, "es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.3.tgz", + "integrity": "sha512-i1gCgmR9dCl6Vil6UKPI/trA69s08g/syhiDK9TG0Nf1RJjjFI+AzoWW7sPufzkgYAn861skuCwJa0pIIHYxvg==", "dev": true, "peer": true }, @@ -20120,9 +18056,9 @@ } }, "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true }, "escape-string-regexp": { @@ -20509,9 +18445,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, "peer": true } @@ -20643,160 +18579,46 @@ "dev": true, "peer": true }, - "exec-sh": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz", - "integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==", - "dev": true - }, "execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", - "dev": true, + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" + }, + "dependencies": { + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + } } }, "exit": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", "dev": true, "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "expect": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", - "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-styles": "^4.0.0", - "jest-get-type": "^26.3.0", - "jest-matcher-utils": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-regex-util": "^26.0.0" + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" } }, "exponential-backoff": { @@ -20804,16 +18626,6 @@ "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==" }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, "external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -20825,48 +18637,6 @@ "tmp": "^0.0.33" } }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -20880,9 +18650,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -20912,9 +18682,9 @@ } }, "fb-watchman": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", - "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", "dev": true, "requires": { "bser": "2.1.1" @@ -21008,9 +18778,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "requires": { "to-regex-range": "^5.0.1" } @@ -21114,12 +18884,6 @@ "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==", "dev": true }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, "foreground-child": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", @@ -21147,15 +18911,6 @@ "mime-types": "^2.1.12" } }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, "fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -21170,9 +18925,9 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "optional": true }, @@ -21286,12 +19041,6 @@ "get-intrinsic": "^1.1.1" } }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, "github-username": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/github-username/-/github-username-6.0.0.tgz", @@ -21321,6 +19070,13 @@ "is-glob": "^4.0.1" } }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "peer": true + }, "globals": { "version": "13.8.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", @@ -21378,9 +19134,9 @@ } }, "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "graphviz": { "version": "0.0.9", @@ -21398,13 +19154,6 @@ "devOptional": true, "peer": true }, - "growly": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", - "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", - "dev": true, - "optional": true - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -21453,72 +19202,11 @@ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" }, - "html-encoding-sniffer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", - "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", - "dev": true, - "requires": { - "whatwg-encoding": "^1.0.5" - } - }, "html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -21535,6 +19223,7 @@ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "devOptional": true, + "peer": true, "requires": { "@tootallnate/once": "1", "agent-base": "6", @@ -21560,10 +19249,9 @@ } }, "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" }, "humanize-ms": { "version": "1.2.1", @@ -21615,9 +19303,9 @@ } }, "import-local": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", - "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", "dev": true, "requires": { "pkg-dir": "^4.2.0", @@ -21713,18 +19401,20 @@ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" }, - "ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==" - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, + "ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", "requires": { - "kind-of": "^6.0.0" + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "dependencies": { + "sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" + } } }, "is-arrayish": { @@ -21751,27 +19441,12 @@ "has-tostringtag": "^1.0.0" } }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, "is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, "is-core-module": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", @@ -21780,48 +19455,12 @@ "has": "^1.0.3" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, "is-date-object": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", "dev": true }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true, - "optional": true - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -21888,21 +19527,6 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-potential-custom-element-name": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", - "dev": true - }, "is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", @@ -21967,12 +19591,6 @@ "has-symbols": "^1.0.1" } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, "is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -22001,22 +19619,6 @@ "call-bind": "^1.0.2" } }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "optional": true, - "requires": { - "is-docker": "^2.0.0" - } - }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -22033,53 +19635,40 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true }, "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", + "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", "dev": true, "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" } }, "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", "dev": true, "requires": { "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", + "make-dir": "^4.0.0", "supports-color": "^7.1.0" } }, "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", "dev": true, "requires": { "debug": "^4.1.1", @@ -22088,9 +19677,9 @@ } }, "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -22118,617 +19707,617 @@ } }, "jest": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", - "integrity": "sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", "dev": true, "requires": { - "@jest/core": "^26.6.3", + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", "import-local": "^3.0.2", - "jest-cli": "^26.6.3" + "jest-cli": "^29.7.0" } }, "jest-changed-files": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.2.tgz", - "integrity": "sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", "dev": true, "requires": { - "@jest/types": "^26.6.2", - "execa": "^4.0.0", - "throat": "^5.0.0" + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "dependencies": { + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + } + } + }, + "jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "dependencies": { + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + } } }, "jest-cli": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz", - "integrity": "sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", "dev": true, "requires": { - "@jest/core": "^26.6.3", - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", + "create-jest": "^29.7.0", "exit": "^0.1.2", - "graceful-fs": "^4.2.4", "import-local": "^3.0.2", - "is-ci": "^2.0.0", - "jest-config": "^26.6.3", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "prompts": "^2.0.1", - "yargs": "^15.4.1" + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" }, "dependencies": { "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, "requires": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" } }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" } }, "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true } } }, "jest-config": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.3.tgz", - "integrity": "sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", "dev": true, "requires": { - "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.6.3", - "@jest/types": "^26.6.2", - "babel-jest": "^26.6.3", + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", "chalk": "^4.0.0", + "ci-info": "^3.2.0", "deepmerge": "^4.2.2", - "glob": "^7.1.1", - "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.6.2", - "jest-environment-node": "^26.6.2", - "jest-get-type": "^26.3.0", - "jest-jasmine2": "^26.6.3", - "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.6.2", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", - "micromatch": "^4.0.2", - "pretty-format": "^26.6.2" + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + } } }, "jest-diff": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", - "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", "dev": true, "requires": { "chalk": "^4.0.0", - "diff-sequences": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, "jest-docblock": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-26.0.0.tgz", - "integrity": "sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", "dev": true, "requires": { "detect-newline": "^3.0.0" } }, "jest-each": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.2.tgz", - "integrity": "sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", "dev": true, "requires": { - "@jest/types": "^26.6.2", + "@jest/types": "^29.6.3", "chalk": "^4.0.0", - "jest-get-type": "^26.3.0", - "jest-util": "^26.6.2", - "pretty-format": "^26.6.2" - } - }, - "jest-environment-jsdom": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz", - "integrity": "sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==", - "dev": true, - "requires": { - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2", - "jsdom": "^16.4.0" + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" } }, "jest-environment-node": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz", - "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", "dev": true, "requires": { - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "jest-mock": "^26.6.2", - "jest-util": "^26.6.2" + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" } }, "jest-get-type": { - "version": "26.3.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", - "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", "dev": true }, "jest-haste-map": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", - "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", "dev": true, "requires": { - "@jest/types": "^26.6.2", - "@types/graceful-fs": "^4.1.2", + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", - "fsevents": "^2.1.2", - "graceful-fs": "^4.2.4", - "jest-regex-util": "^26.0.0", - "jest-serializer": "^26.6.2", - "jest-util": "^26.6.2", - "jest-worker": "^26.6.2", - "micromatch": "^4.0.2", - "sane": "^4.0.3", - "walker": "^1.0.7" - } - }, - "jest-jasmine2": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz", - "integrity": "sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==", - "dev": true, - "requires": { - "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.6.2", - "@jest/source-map": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "expect": "^26.6.2", - "is-generator-fn": "^2.0.0", - "jest-each": "^26.6.2", - "jest-matcher-utils": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-runtime": "^26.6.3", - "jest-snapshot": "^26.6.2", - "jest-util": "^26.6.2", - "pretty-format": "^26.6.2", - "throat": "^5.0.0" + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" } }, "jest-json-schema": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/jest-json-schema/-/jest-json-schema-5.0.0.tgz", - "integrity": "sha512-AggSUrNDSGndFQJAvrAHQzW9P/4tu9bnCIlvyzcOszgk8By1EU1bNP15TA38/4YekDgac49GniInpa0HsIbAjA==", - "dev": true, - "requires": { - "ajv": "^6.10.2", - "chalk": "^4.1.0", - "jest-matcher-utils": "^26.6.1" - } - }, - "jest-leak-detector": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz", - "integrity": "sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==", - "dev": true, - "requires": { - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" - } - }, - "jest-matcher-utils": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", - "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^26.6.2", - "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.2" - } - }, - "jest-message-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", - "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.6.2", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "micromatch": "^4.0.2", - "pretty-format": "^26.6.2", - "slash": "^3.0.0", - "stack-utils": "^2.0.2" - } - }, - "jest-mock": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz", - "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "@types/node": "*" - } - }, - "jest-pnp-resolver": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", - "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", - "dev": true, - "requires": {} - }, - "jest-regex-util": { - "version": "26.0.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", - "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", - "dev": true - }, - "jest-resolve": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz", - "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jest-json-schema/-/jest-json-schema-6.1.0.tgz", + "integrity": "sha512-LMHuLmKjr/4X+H8v1xF5TEwfYEkzwGeWJ0epYQVQhlVTDDR5FWCdSO8vmsecb5cLf9NeWAqMKn3qhJvP9um0AA==", "dev": true, "requires": { - "@jest/types": "^26.6.2", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^26.6.2", - "read-pkg-up": "^7.0.1", - "resolve": "^1.18.1", - "slash": "^3.0.0" + "ajv": "^8.8.2", + "ajv-formats": "^2.1.1", + "chalk": "^4.1.2", + "jest-matcher-utils": "^27.3.1" }, "dependencies": { - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "ajv": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz", + "integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "fast-deep-equal": "^3.1.3", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.4.1" } }, - "read-pkg": { + "ansi-styles": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "diff-sequences": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz", + "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==", + "dev": true + }, + "jest-diff": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz", + "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==", "dev": true, "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } + "chalk": "^4.0.0", + "diff-sequences": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" } }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "jest-get-type": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz", + "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==", + "dev": true + }, + "jest-matcher-utils": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz", + "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==", "dev": true, "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" + "chalk": "^4.0.0", + "jest-diff": "^27.5.1", + "jest-get-type": "^27.5.1", + "pretty-format": "^27.5.1" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" } - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true } } }, - "jest-resolve-dependencies": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz", - "integrity": "sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==", + "jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", "dev": true, "requires": { - "@jest/types": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-snapshot": "^26.6.2" + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, - "jest-runner": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz", - "integrity": "sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==", + "jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", "dev": true, "requires": { - "@jest/console": "^26.6.2", - "@jest/environment": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/node": "*", "chalk": "^4.0.0", - "emittery": "^0.7.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.4", - "jest-config": "^26.6.3", - "jest-docblock": "^26.0.0", - "jest-haste-map": "^26.6.2", - "jest-leak-detector": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-resolve": "^26.6.2", - "jest-runtime": "^26.6.3", - "jest-util": "^26.6.2", - "jest-worker": "^26.6.2", - "source-map-support": "^0.5.6", - "throat": "^5.0.0" + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" } }, - "jest-runtime": { - "version": "26.6.3", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz", - "integrity": "sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==", - "dev": true, - "requires": { - "@jest/console": "^26.6.2", - "@jest/environment": "^26.6.2", - "@jest/fake-timers": "^26.6.2", - "@jest/globals": "^26.6.2", - "@jest/source-map": "^26.6.2", - "@jest/test-result": "^26.6.2", - "@jest/transform": "^26.6.2", - "@jest/types": "^26.6.2", - "@types/yargs": "^15.0.0", + "jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", - "cjs-module-lexer": "^0.6.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.4", - "jest-config": "^26.6.3", - "jest-haste-map": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-mock": "^26.6.2", - "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.6.2", - "jest-snapshot": "^26.6.2", - "jest-util": "^26.6.2", - "jest-validate": "^26.6.2", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", "slash": "^3.0.0", - "strip-bom": "^4.0.0", - "yargs": "^15.4.1" + "stack-utils": "^2.0.3" }, "dependencies": { - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dev": true, "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" } - }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + } + } + }, + "jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + } + }, + "jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "requires": {} + }, + "jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true + }, + "jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "requires": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + } + }, + "jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "requires": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "dependencies": { + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "yocto-queue": "^0.1.0" } }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" } } } }, - "jest-serializer": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", - "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==", - "dev": true, - "requires": { + "jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", - "graceful-fs": "^4.2.4" + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" } }, "jest-snapshot": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.2.tgz", - "integrity": "sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", "dev": true, "requires": { - "@babel/types": "^7.0.0", - "@jest/types": "^26.6.2", - "@types/babel__traverse": "^7.0.4", - "@types/prettier": "^2.0.0", + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", "chalk": "^4.0.0", - "expect": "^26.6.2", - "graceful-fs": "^4.2.4", - "jest-diff": "^26.6.2", - "jest-get-type": "^26.3.0", - "jest-haste-map": "^26.6.2", - "jest-matcher-utils": "^26.6.2", - "jest-message-util": "^26.6.2", - "jest-resolve": "^26.6.2", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", "natural-compare": "^1.4.0", - "pretty-format": "^26.6.2", - "semver": "^7.3.2" + "pretty-format": "^29.7.0", + "semver": "^7.5.3" } }, "jest-util": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", - "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, "requires": { - "@jest/types": "^26.6.2", + "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", - "graceful-fs": "^4.2.4", - "is-ci": "^2.0.0", - "micromatch": "^4.0.2" + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" } }, "jest-validate": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz", - "integrity": "sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, "requires": { - "@jest/types": "^26.6.2", - "camelcase": "^6.0.0", + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", "chalk": "^4.0.0", - "jest-get-type": "^26.3.0", + "jest-get-type": "^29.6.3", "leven": "^3.1.0", - "pretty-format": "^26.6.2" + "pretty-format": "^29.7.0" }, "dependencies": { "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true } } }, "jest-watcher": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.2.tgz", - "integrity": "sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, "requires": { - "@jest/test-result": "^26.6.2", - "@jest/types": "^26.6.2", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^26.6.2", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", "string-length": "^4.0.1" } }, "jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "requires": { "@types/node": "*", + "jest-util": "^29.7.0", "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } } }, "js-tokens": { @@ -22744,48 +20333,10 @@ "argparse": "^2.0.1" } }, - "jsdom": { - "version": "16.7.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", - "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", - "dev": true, - "requires": { - "abab": "^2.0.5", - "acorn": "^8.2.4", - "acorn-globals": "^6.0.0", - "cssom": "^0.4.4", - "cssstyle": "^2.3.0", - "data-urls": "^2.0.0", - "decimal.js": "^10.2.1", - "domexception": "^2.0.1", - "escodegen": "^2.0.0", - "form-data": "^3.0.0", - "html-encoding-sniffer": "^2.0.1", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.0", - "parse5": "6.0.1", - "saxes": "^5.0.1", - "symbol-tree": "^3.2.4", - "tough-cookie": "^4.0.0", - "w3c-hr-time": "^1.0.2", - "w3c-xmlserializer": "^2.0.0", - "webidl-conversions": "^6.1.0", - "whatwg-encoding": "^1.0.5", - "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^8.5.0", - "ws": "^7.4.6", - "xml-name-validator": "^3.0.0" - }, - "dependencies": { - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true - } - } + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" }, "jsesc": { "version": "2.5.2", @@ -22884,12 +20435,6 @@ "json-buffer": "3.0.1" } }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, "kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -23036,6 +20581,12 @@ "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", "dev": true }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", + "dev": true + }, "lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", @@ -23071,6 +20622,8 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "devOptional": true, + "peer": true, "requires": { "yallist": "^4.0.0" } @@ -23114,20 +20667,12 @@ } }, "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", "dev": true, "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "semver": "^7.5.3" } }, "make-error": { @@ -23162,27 +20707,12 @@ } }, "makeerror": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", - "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, "requires": { - "tmpl": "1.0.x" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" + "tmpl": "1.0.5" } }, "mem-fs": { @@ -23213,16 +20743,6 @@ "multimatch": "^5.0.0", "normalize-path": "^3.0.0", "textextensions": "^5.13.0" - }, - "dependencies": { - "ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", - "requires": { - "jake": "^10.8.5" - } - } } }, "merge-stream": { @@ -23353,16 +20873,6 @@ "yallist": "^4.0.0" } }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - } - }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -23435,30 +20945,11 @@ "devOptional": true }, "nanoid": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", - "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -23477,12 +20968,6 @@ "dev": true, "peer": true }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "nise": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", @@ -23619,34 +21104,13 @@ "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", - "dev": true - }, - "node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", "dev": true }, - "node-notifier": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz", - "integrity": "sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg==", - "dev": true, - "optional": true, - "requires": { - "growly": "^1.3.0", - "is-wsl": "^2.2.0", - "semver": "^7.3.2", - "shellwords": "^0.1.1", - "uuid": "^8.3.0", - "which": "^2.0.2" - } - }, "node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node-source-walk": { @@ -23690,9 +21154,9 @@ }, "dependencies": { "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==" } } }, @@ -24012,12 +21476,6 @@ "set-blocking": "^2.0.0" } }, - "nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", - "dev": true - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -24025,74 +21483,6 @@ "devOptional": true, "peer": true }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "object-inspect": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", @@ -24105,15 +21495,6 @@ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, "object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -24160,15 +21541,6 @@ "es-abstract": "^1.19.5" } }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, "object.values": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", @@ -24238,17 +21610,12 @@ "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" }, - "p-each-series": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", - "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", - "dev": true - }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "devOptional": true + "devOptional": true, + "peer": true }, "p-limit": { "version": "2.3.0", @@ -24375,18 +21742,6 @@ "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", "dev": true }, - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -24442,6 +21797,11 @@ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, + "picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==" + }, "picomatch": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", @@ -24454,13 +21814,10 @@ "devOptional": true }, "pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", - "dev": true, - "requires": { - "node-modules-regexp": "^1.0.0" - } + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true }, "pkg-dir": { "version": "2.0.0", @@ -24528,21 +21885,15 @@ "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, "postcss": { - "version": "8.2.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.14.tgz", - "integrity": "sha512-+jD0ZijcvyCqPQo/m/CW0UcARpdFylq04of+Q7RKX6f/Tu+dvpUI/9Sp81+i6/vJThnOBX09Quw0ZLOVwpzX3w==", + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", "dev": true, "requires": { - "colorette": "^1.2.2", - "nanoid": "^3.1.22", - "source-map": "^0.6.1" + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" } }, "postcss-values-parser": { @@ -24688,15 +22039,28 @@ "peer": true }, "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", "dev": true, "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true + } } }, "pretty-ms": { @@ -24756,9 +22120,9 @@ } }, "prompts": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", - "integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", "dev": true, "requires": { "kleur": "^3.0.3", @@ -24786,12 +22150,6 @@ } } }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -24807,6 +22165,12 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -24863,7 +22227,7 @@ "read-input": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/read-input/-/read-input-0.3.1.tgz", - "integrity": "sha1-WzFpMIATRk/9puyS5Y0tPOqUjfE=", + "integrity": "sha512-J1ZkWCnB4altU7RTe+62PSfa21FrEtfKyO9fuqR3yP8kZku3nIwaw2Krj383JC7egAIl5Zyz2w+EOu9uXH5HZw==", "dev": true }, "read-package-json": { @@ -25080,16 +22444,6 @@ "dev": true, "peer": true }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, "regexp.prototype.flags": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", @@ -25111,19 +22465,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "devOptional": true - }, - "repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true + "devOptional": true, + "peer": true }, "replace-ext": { "version": "1.0.1", @@ -25144,12 +22487,6 @@ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "requirejs": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz", @@ -25209,10 +22546,10 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true }, "responselike": { @@ -25233,12 +22570,6 @@ "signal-exit": "^3.0.2" } }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, "retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", @@ -25257,12 +22588,6 @@ "glob": "^7.1.3" } }, - "rsvp": { - "version": "4.8.5", - "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", - "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", - "dev": true - }, "run-async": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", @@ -25291,256 +22616,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "devOptional": true }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "devOptional": true }, - "sane": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", - "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", - "dev": true, - "requires": { - "@cnakazawa/watch": "^1.0.3", - "anymatch": "^2.0.0", - "capture-exit": "^2.0.0", - "exec-sh": "^0.3.2", - "execa": "^1.0.0", - "fb-watchman": "^2.0.0", - "micromatch": "^3.1.4", - "minimist": "^1.1.1", - "walker": "~1.0.5" - }, - "dependencies": { - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, "sass-lookup": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/sass-lookup/-/sass-lookup-3.0.0.tgz", @@ -25558,19 +22639,10 @@ } } }, - "saxes": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", - "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", - "dev": true, - "requires": { - "xmlchars": "^2.2.0" - } - }, "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "peer": true, "requires": { @@ -25587,17 +22659,14 @@ "peer": true }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==" }, "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, "peer": true, "requires": { @@ -25609,35 +22678,6 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -25661,13 +22701,6 @@ "rechoir": "^0.6.2" } }, - "shellwords": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", - "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", - "dev": true, - "optional": true - }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -25922,174 +22955,12 @@ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==" }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, "socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "requires": { - "ip": "^2.0.0", + "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" } }, @@ -26119,18 +22990,11 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } + "source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true }, "source-map-support": { "version": "0.5.21", @@ -26142,12 +23006,6 @@ "source-map": "^0.6.0" } }, - "source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "dev": true - }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", @@ -26176,15 +23034,6 @@ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==" }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -26202,92 +23051,14 @@ } }, "stack-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", - "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, "requires": { "escape-string-regexp": "^2.0.0" } }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, "string_decoder": { "version": "0.10.31", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", @@ -26429,12 +23200,6 @@ } } }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -26472,16 +23237,6 @@ "has-flag": "^4.0.0" } }, - "supports-hyperlinks": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", - "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", - "dev": true, - "requires": { - "has-flag": "^4.0.0", - "supports-color": "^7.0.0" - } - }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -26489,12 +23244,6 @@ "dev": true, "peer": true }, - "symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, "syntax-error": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", @@ -26545,25 +23294,22 @@ "dev": true }, "tar": { - "version": "6.1.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", - "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^4.0.0", + "minipass": "^5.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "dependencies": { "minipass": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz", - "integrity": "sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw==", - "requires": { - "yallist": "^4.0.0" - } + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==" } } }, @@ -26573,33 +23319,23 @@ "integrity": "sha1-ZxrWPVe+D+nXKUZks/xABjZnimA=", "dev": true }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" - } - }, "terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.31.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz", + "integrity": "sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==", "dev": true, "peer": true, "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, "dependencies": { "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "peer": true }, @@ -26613,17 +23349,17 @@ } }, "terser-webpack-plugin": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", - "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "peer": true, "requires": { - "@jridgewell/trace-mapping": "^0.3.7", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "terser": "^5.7.2" + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" }, "dependencies": { "jest-worker": { @@ -26671,12 +23407,6 @@ "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-5.15.0.tgz", "integrity": "sha512-MeqZRHLuaGamUXGuVn2ivtU3LA3mLCCIO5kUGoohTCoGmCBg/+8yPhWVX9WSl9telvVd8erftjFk9Fwb2dD6rw==" }, - "throat": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", - "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", - "dev": true - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -26743,41 +23473,9 @@ "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -26786,26 +23484,6 @@ "is-number": "^7.0.0" } }, - "tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", - "dev": true, - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - } - }, - "tr46": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", - "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", - "dev": true, - "requires": { - "punycode": "^2.1.1" - } - }, "treeverse": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-1.0.4.tgz", @@ -26814,21 +23492,27 @@ "peer": true }, "ts-jest": { - "version": "26.5.6", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.6.tgz", - "integrity": "sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA==", + "version": "29.1.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.4.tgz", + "integrity": "sha512-YiHwDhSvCiItoAgsKtoLFCuakDzDsJ1DLDnSouTaTmdOcOwIkSzbLXduaQ6M5DRVhuZC/NYaaZ/mtHbWMv/S6Q==", "dev": true, "requires": { "bs-logger": "0.x", - "buffer-from": "1.x", "fast-json-stable-stringify": "2.x", - "jest-util": "^26.1.0", - "json5": "2.x", - "lodash": "4.x", + "jest-util": "^29.0.0", + "json5": "^2.2.3", + "lodash.memoize": "4.x", "make-error": "1.x", - "mkdirp": "1.x", - "semver": "7.x", - "yargs-parser": "20.x" + "semver": "^7.5.3", + "yargs-parser": "^21.0.1" + }, + "dependencies": { + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } } }, "ts-loader": { @@ -27117,19 +23801,10 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, "typescript": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", - "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true }, "unbox-primitive": { @@ -27144,26 +23819,6 @@ "which-boxed-primitive": "^1.0.2" } }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - } - } - }, "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", @@ -27195,64 +23850,22 @@ "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, "untildify": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", "devOptional": true }, + "update-browserslist-db": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "dev": true, + "requires": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + } + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -27262,30 +23875,11 @@ "punycode": "^2.1.0" } }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "optional": true - }, "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", @@ -27293,22 +23887,14 @@ "dev": true }, "v8-to-istanbul": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", - "integrity": "sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, "requires": { + "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0", - "source-map": "^0.7.3" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - } + "convert-source-map": "^2.0.0" } }, "validate-npm-package-license": { @@ -27396,24 +23982,6 @@ "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==", "dev": true }, - "w3c-hr-time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", - "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", - "dev": true, - "requires": { - "browser-process-hrtime": "^1.0.0" - } - }, - "w3c-xmlserializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", - "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", - "dev": true, - "requires": { - "xml-name-validator": "^3.0.0" - } - }, "walk-up-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz", @@ -27428,32 +23996,23 @@ "dev": true }, "walker": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", - "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", "dev": true, "requires": { - "makeerror": "1.0.x" + "makeerror": "1.0.12" } }, "watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", + "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", "dev": true, "peer": true, "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" - }, - "dependencies": { - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "peer": true - } } }, "wcwidth": { @@ -27465,66 +24024,53 @@ "defaults": "^1.0.3" } }, - "webidl-conversions": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", - "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", - "dev": true - }, "webpack": { - "version": "5.73.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz", - "integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==", + "version": "5.92.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.92.0.tgz", + "integrity": "sha512-Bsw2X39MYIgxouNATyVpCNVWBCuUwDgWtN78g6lSdPJRLaQ/PUVm/oXcaRAyY/sMFoKFQrsPeqvTizWtq7QPCA==", "dev": true, "peer": true, "requires": { "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", + "acorn": "^8.7.1", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.9.3", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.17.0", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.3.1", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "dependencies": { "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "peer": true }, - "acorn-import-assertions": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", - "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "dev": true, "peer": true, "requires": {} - }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true, - "peer": true } } }, @@ -27535,32 +24081,6 @@ "dev": true, "peer": true }, - "whatwg-encoding": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", - "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", - "dev": true, - "requires": { - "iconv-lite": "0.4.24" - } - }, - "whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", - "dev": true - }, - "whatwg-url": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", - "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", - "dev": true, - "requires": { - "lodash": "^4.7.0", - "tr46": "^2.1.0", - "webidl-conversions": "^6.1.0" - } - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -27582,12 +24102,6 @@ "is-symbol": "^1.0.3" } }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, "which-pm": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-pm/-/which-pm-2.0.0.tgz", @@ -27608,9 +24122,9 @@ } }, "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, "wrap-ansi": { @@ -27640,36 +24154,15 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "devOptional": true, "requires": { "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" + "signal-exit": "^3.0.7" } }, - "ws": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", - "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==", - "dev": true, - "requires": {} - }, - "xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", - "dev": true - }, - "xmlchars": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", - "dev": true - }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", @@ -27774,24 +24267,6 @@ "devOptional": true, "peer": true }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "devOptional": true, - "peer": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -27803,20 +24278,6 @@ "path-exists": "^4.0.0" } }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "devOptional": true, - "peer": true - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "devOptional": true, - "peer": true - }, "inquirer": { "version": "8.2.5", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", @@ -28046,22 +24507,6 @@ } } }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, "fs-minipass": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", @@ -28092,11 +24537,6 @@ "wide-align": "^1.1.5" } }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" - }, "hosted-git-info": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz", @@ -28115,11 +24555,6 @@ "debug": "4" } }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" - }, "ignore-walk": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.3.tgz", @@ -28651,8 +25086,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "devOptional": true, - "peer": true + "devOptional": true } } } diff --git a/package.json b/package.json index af8cf098..1fd58280 100644 --- a/package.json +++ b/package.json @@ -55,12 +55,12 @@ "eslint-plugin-import": "^2.22.1", "eslint-plugin-json": "^2.1.2", "eslint-plugin-prettier": "^3.4.0", - "jest": "^26.6.3", - "jest-json-schema": "^5.0.0", + "jest": "^29.7.0", + "jest-json-schema": "^6.1.0", "madge": "^4.0.2", "prettier": "^2.2.1", "rimraf": "^3.0.2", - "ts-jest": "^26.5.5", + "ts-jest": "^29.1.4", "ts-loader": "^9.1.0", "ts-node": "^9.1.1", "typescript": "^4.2.4", From ef9216e0b70fb1b40066dc43834eca4c4c5bf4c2 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Thu, 13 Jun 2024 20:15:02 +0200 Subject: [PATCH 53/83] Fix compilation issues Signed-off-by: Jakub Dzikowski --- e2e/TestCommands.ts | 4 ++-- src/setup-docker/index.ts | 2 +- tsconfig.json | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/e2e/TestCommands.ts b/e2e/TestCommands.ts index e0750145..1f8c943f 100644 --- a/e2e/TestCommands.ts +++ b/e2e/TestCommands.ts @@ -31,10 +31,10 @@ const executeCommand = (c: string, noConsole = false): CommandOutput => { log(output); return commandOutput(0, output); } catch (e) { - const output = (e.output || []).join(""); + const output = ((e as { output?: string[] }).output ?? []).join(""); // eslint-disable-next-line no-console console.error(`Error executing command ${c}`, e, output); - return commandOutput(e.status, output); + return commandOutput((e as { status: number }).status, output); } }; diff --git a/src/setup-docker/index.ts b/src/setup-docker/index.ts index 554e0bdf..47ac08e0 100644 --- a/src/setup-docker/index.ts +++ b/src/setup-docker/index.ts @@ -203,7 +203,7 @@ export default class SetupDockerGenerator extends Generator { _createPrivateDataCollectionConfigs(chaincodes: ChaincodeConfig[]): void { chaincodes.forEach(({ privateData, privateDataConfigFile }) => { - if (privateData !== [] && !!privateDataConfigFile) { + if (privateData && privateData.length && !!privateDataConfigFile) { this.fs.write( this.destinationPath(`fabric-config/${privateDataConfigFile}`), JSON.stringify(privateData, undefined, 2), diff --git a/tsconfig.json b/tsconfig.json index 1229da60..169b046e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,8 @@ "declarationMap": true, "noUnusedLocals": true, "noUnusedParameters": true, - "resolveJsonModule": true + "resolveJsonModule": true, + "skipLibCheck": true }, "include": [ "src", From 734b87de8132de4155477f0bcc977c734be14bcf Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Thu, 13 Jun 2024 20:18:40 +0200 Subject: [PATCH 54/83] Update snapshots Signed-off-by: Jakub Dzikowski --- e2e/__snapshots__/extendConfig.test.ts.snap | 5334 ++++++++--------- ...-1chaincode-private-data.json.test.ts.snap | 1890 +++--- ...1.4-1org-1chaincode-raft.json.test.ts.snap | 1662 ++--- ...-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 1944 +++--- ...2chaincodes-private-data.yaml.test.ts.snap | 2018 +++---- ...4-2orgs-2chaincodes-raft.json.test.ts.snap | 2164 +++---- ...hlf2-1org-1chaincode-k8s.json.test.ts.snap | 402 +- ...1chaincode-raft-explorer.json.test.ts.snap | 1870 +++--- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 1864 +++--- ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 2856 ++++----- ...1chaincode-raft-explorer.json.test.ts.snap | 3024 +++++----- e2e/__snapshots__/fabloCommands.test.ts.snap | 4710 +++++++-------- e2e/__snapshots__/schema.test.ts.snap | 272 +- 13 files changed, 15005 insertions(+), 15005 deletions(-) diff --git a/e2e/__snapshots__/extendConfig.test.ts.snap b/e2e/__snapshots__/extendConfig.test.ts.snap index e8f69a22..b1c297fa 100644 --- a/e2e/__snapshots__/extendConfig.test.ts.snap +++ b/e2e/__snapshots__/extendConfig.test.ts.snap @@ -1,16 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`extend config samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -Object { - "chaincodes": Array [ - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -19,10 +19,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -32,8 +32,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -43,15 +43,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -62,12 +62,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -76,10 +76,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -90,18 +90,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -111,8 +111,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -123,8 +123,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -137,7 +137,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -147,13 +147,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -162,10 +162,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -175,8 +175,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -186,15 +186,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -205,12 +205,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -219,10 +219,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -233,14 +233,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -251,7 +251,7 @@ Object { }, ], "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": Object { + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -261,15 +261,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -280,12 +280,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -296,20 +296,20 @@ Object { }, ], "peersCount": 1, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, "directory": "./chaincodes/chaincode-kv-node-1.4", "endorsement": "OR('Org1MSP.member', 'Org2MSP.member')", - "init": "{\\"Args\\":[]}", - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "init": "{"Args":[]}", + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -318,10 +318,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -331,8 +331,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -342,15 +342,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -361,12 +361,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -375,10 +375,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -389,19 +389,19 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "lang": "node", "name": "chaincode1", - "privateData": Array [ - Object { + "privateData": [ + { "blockToLive": 0, "maxPeerCount": 3, "name": "org1-collection", "policy": "OR('Org1MSP.member')", "requiredPeerCount": 1, }, - Object { + { "blockToLive": 0, "maxPeerCount": 3, "name": "org2-collection", @@ -413,14 +413,14 @@ Object { "version": "0.0.1", }, ], - "channels": Array [ - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -429,10 +429,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -442,8 +442,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -453,15 +453,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -472,12 +472,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -486,10 +486,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -500,18 +500,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -521,8 +521,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -533,8 +533,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -547,7 +547,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -557,13 +557,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -572,10 +572,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -585,8 +585,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -596,15 +596,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -615,12 +615,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -629,10 +629,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -643,14 +643,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -661,7 +661,7 @@ Object { }, ], "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": Object { + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -671,15 +671,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -690,12 +690,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -706,14 +706,14 @@ Object { }, ], "peersCount": 1, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, ], - "global": Object { - "capabilities": Object { + "global": { + "capabilities": { "application": "V1_3", "channel": "V1_3", "isV2": false, @@ -727,21 +727,21 @@ Object { "fabricNodeenvVersion": "1.3", "fabricRecommendedNodeVersion": "12", "fabricVersion": "1.3.0", - "monitoring": Object { + "monitoring": { "loglevel": "info", }, - "paths": Object { + "paths": { "chaincodesBaseDir": "", "fabloConfig": "", }, "tls": false, - "tools": Object {}, + "tools": {}, }, - "hooks": Object { + "hooks": { "postGenerate": "", }, - "orderedHeadsDistinct": Array [ - Object { + "orderedHeadsDistinct": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -752,16 +752,16 @@ Object { "port": 7030, }, ], - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -771,8 +771,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -783,8 +783,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -798,11 +798,11 @@ Object { "profileName": "Group1Genesis", }, ], - "orgs": Array [ - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer.example.com", "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", @@ -812,7 +812,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer.example.com", }, "cryptoConfigFileName": "crypto-config-orderer", @@ -820,17 +820,17 @@ Object { "headPeer": undefined, "mspName": "OrdererMSP", "name": "Orderer", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -841,8 +841,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -856,16 +856,16 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -874,10 +874,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -887,8 +887,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -898,15 +898,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -917,12 +917,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -931,10 +931,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -945,14 +945,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -963,7 +963,7 @@ Object { }, ], "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": Object { + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -973,15 +973,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -992,12 +992,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -1008,23 +1008,23 @@ Object { }, ], "peersCount": 1, - "tools": Object {}, + "tools": {}, }, ], } `; exports[`extend config samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -Object { - "chaincodes": Array [ - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1033,10 +1033,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1046,8 +1046,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -1057,15 +1057,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1076,12 +1076,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1090,10 +1090,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1104,18 +1104,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1125,8 +1125,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1137,8 +1137,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1151,7 +1151,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1161,13 +1161,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1176,10 +1176,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1189,8 +1189,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -1200,15 +1200,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1219,12 +1219,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1233,10 +1233,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1247,20 +1247,20 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, "directory": "./chaincodes/chaincode-kv-node-1.4", "endorsement": "AND ('Org1MSP.member')", - "init": "{\\"Args\\":[]}", - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "init": "{"Args":[]}", + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1269,10 +1269,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1282,8 +1282,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -1293,15 +1293,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1312,12 +1312,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1326,10 +1326,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1340,23 +1340,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "lang": "node", "name": "chaincode1", - "privateData": Array [], + "privateData": [], "privateDataConfigFile": undefined, "version": "0.0.1", }, ], - "channels": Array [ - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1365,10 +1365,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1378,8 +1378,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -1389,15 +1389,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1408,12 +1408,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1422,10 +1422,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1436,18 +1436,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1457,8 +1457,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1469,8 +1469,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1483,7 +1483,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1493,13 +1493,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1508,10 +1508,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1521,8 +1521,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -1532,15 +1532,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1551,12 +1551,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1565,10 +1565,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1579,14 +1579,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, ], - "global": Object { - "capabilities": Object { + "global": { + "capabilities": { "application": "V1_4_2", "channel": "V1_4_3", "isV2": false, @@ -1600,21 +1600,21 @@ Object { "fabricNodeenvVersion": "1.4", "fabricRecommendedNodeVersion": "12", "fabricVersion": "1.4.6", - "monitoring": Object { + "monitoring": { "loglevel": "debug", }, - "paths": Object { + "paths": { "chaincodesBaseDir": "", "fabloConfig": "", }, "tls": true, - "tools": Object {}, + "tools": {}, }, - "hooks": Object { + "hooks": { "postGenerate": "", }, - "orderedHeadsDistinct": Array [ - Object { + "orderedHeadsDistinct": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1625,16 +1625,16 @@ Object { "port": 7030, }, ], - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1644,8 +1644,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1656,8 +1656,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1671,11 +1671,11 @@ Object { "profileName": "Group1Genesis", }, ], - "orgs": Array [ - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer.example.com", "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", @@ -1685,7 +1685,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer.example.com", }, "cryptoConfigFileName": "crypto-config-orderer", @@ -1693,17 +1693,17 @@ Object { "headPeer": undefined, "mspName": "OrdererMSP", "name": "Orderer", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1714,8 +1714,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -1729,16 +1729,16 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1747,10 +1747,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1760,8 +1760,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -1771,15 +1771,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1790,12 +1790,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1804,10 +1804,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1818,23 +1818,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], } `; exports[`extend config samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -Object { - "chaincodes": Array [ - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1843,10 +1843,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1856,8 +1856,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -1867,15 +1867,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1886,12 +1886,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1902,18 +1902,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -1923,8 +1923,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -1935,8 +1935,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -1949,7 +1949,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -1959,13 +1959,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -1974,10 +1974,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -1987,8 +1987,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -1998,15 +1998,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2017,12 +2017,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2033,14 +2033,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -2049,10 +2049,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -2062,8 +2062,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -2073,15 +2073,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -2092,12 +2092,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -2108,20 +2108,20 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, "directory": "./chaincodes/chaincode-kv-node-1.4", "endorsement": "AND ('Org1MSP.member', 'Org2MSP.member')", - "init": "{\\"Args\\":[]}", - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "init": "{"Args":[]}", + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2130,10 +2130,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -2143,8 +2143,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -2154,15 +2154,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2173,12 +2173,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2189,23 +2189,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "lang": "node", "name": "chaincode1", - "privateData": Array [], + "privateData": [], "privateDataConfigFile": undefined, "version": "0.0.1", }, ], - "channels": Array [ - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2214,10 +2214,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -2227,8 +2227,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -2238,15 +2238,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2257,12 +2257,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2273,18 +2273,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2294,8 +2294,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2306,8 +2306,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2320,7 +2320,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2330,13 +2330,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2345,10 +2345,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -2358,8 +2358,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -2369,15 +2369,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2388,12 +2388,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2404,14 +2404,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -2420,10 +2420,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -2433,8 +2433,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -2444,15 +2444,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -2463,12 +2463,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -2479,18 +2479,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2499,10 +2499,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -2512,8 +2512,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -2523,15 +2523,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -2542,12 +2542,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -2558,18 +2558,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel2", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2579,8 +2579,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2591,8 +2591,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2605,7 +2605,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2615,13 +2615,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2630,10 +2630,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -2643,8 +2643,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -2654,15 +2654,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -2673,12 +2673,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -2689,14 +2689,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -2705,10 +2705,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -2718,8 +2718,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -2729,15 +2729,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -2748,12 +2748,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -2764,14 +2764,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel2", }, ], - "global": Object { - "capabilities": Object { + "global": { + "capabilities": { "application": "V1_4_2", "channel": "V1_4_3", "isV2": false, @@ -2785,21 +2785,21 @@ Object { "fabricNodeenvVersion": "1.4", "fabricRecommendedNodeVersion": "12", "fabricVersion": "1.4.6", - "monitoring": Object { + "monitoring": { "loglevel": "info", }, - "paths": Object { + "paths": { "chaincodesBaseDir": "", "fabloConfig": "", }, "tls": false, - "tools": Object {}, + "tools": {}, }, - "hooks": Object { + "hooks": { "postGenerate": "", }, - "orderedHeadsDistinct": Array [ - Object { + "orderedHeadsDistinct": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2810,16 +2810,16 @@ Object { "port": 7030, }, ], - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2829,8 +2829,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2841,8 +2841,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2856,11 +2856,11 @@ Object { "profileName": "Group1Genesis", }, ], - "orgs": Array [ - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer.example.com", "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", @@ -2870,7 +2870,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer.example.com", }, "cryptoConfigFileName": "crypto-config-orderer", @@ -2878,17 +2878,17 @@ Object { "headPeer": undefined, "mspName": "OrdererMSP", "name": "Orderer", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2899,8 +2899,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -2914,16 +2914,16 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2932,10 +2932,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -2945,8 +2945,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -2956,15 +2956,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2975,12 +2975,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -2989,10 +2989,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3003,14 +3003,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -3019,10 +3019,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -3032,8 +3032,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -3043,15 +3043,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -3062,12 +3062,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -3076,10 +3076,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -3090,23 +3090,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], } `; exports[`extend config samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -Object { - "chaincodes": Array [ - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3115,10 +3115,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3128,8 +3128,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -3139,15 +3139,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3158,12 +3158,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3172,10 +3172,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3186,18 +3186,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -3207,8 +3207,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -3219,8 +3219,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -3233,7 +3233,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -3243,13 +3243,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3258,10 +3258,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3271,8 +3271,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -3282,15 +3282,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3301,12 +3301,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3315,10 +3315,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3329,14 +3329,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -3347,7 +3347,7 @@ Object { }, ], "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": Object { + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -3357,15 +3357,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -3376,12 +3376,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -3392,20 +3392,20 @@ Object { }, ], "peersCount": 1, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, "directory": "./chaincodes/chaincode-kv-node-1.4", "endorsement": "OR('Org1MSP.member', 'Org2MSP.member')", - "init": "{\\"Args\\":[]}", - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "init": "{"Args":[]}", + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3414,10 +3414,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3427,8 +3427,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -3438,15 +3438,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3457,12 +3457,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3471,10 +3471,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3485,12 +3485,12 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "lang": "node", "name": "or-policy-chaincode", - "privateData": Array [ - Object { + "privateData": [ + { "blockToLive": 0, "maxPeerCount": 3, "memberOnlyRead": true, @@ -3502,14 +3502,14 @@ Object { "privateDataConfigFile": "collections/or-policy-chaincode.json", "version": "0.0.1", }, - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3518,10 +3518,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3531,8 +3531,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -3542,15 +3542,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3561,12 +3561,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3575,10 +3575,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3589,18 +3589,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -3610,8 +3610,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -3622,8 +3622,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -3636,7 +3636,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -3646,13 +3646,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3661,10 +3661,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3674,8 +3674,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -3685,15 +3685,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3704,12 +3704,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3718,10 +3718,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3732,14 +3732,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -3750,7 +3750,7 @@ Object { }, ], "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": Object { + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -3760,15 +3760,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -3779,12 +3779,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -3795,20 +3795,20 @@ Object { }, ], "peersCount": 1, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, "directory": "./chaincodes/chaincode-kv-node-1.4", "endorsement": "AND('Org1MSP.member', 'Org2MSP.member')", - "init": "{\\"Args\\":[]}", - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "init": "{"Args":[]}", + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3817,10 +3817,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3830,8 +3830,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -3841,15 +3841,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3860,12 +3860,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3874,10 +3874,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3888,12 +3888,12 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "lang": "node", "name": "and-policy-chaincode", - "privateData": Array [ - Object { + "privateData": [ + { "blockToLive": 0, "maxPeerCount": 3, "memberOnlyRead": true, @@ -3906,14 +3906,14 @@ Object { "version": "0.0.1", }, ], - "channels": Array [ - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3922,10 +3922,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3935,8 +3935,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -3946,15 +3946,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3965,12 +3965,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -3979,10 +3979,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -3993,18 +3993,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -4014,8 +4014,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -4026,8 +4026,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -4040,7 +4040,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -4050,13 +4050,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4065,10 +4065,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -4078,8 +4078,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -4089,15 +4089,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4108,12 +4108,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4122,10 +4122,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -4136,14 +4136,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -4154,7 +4154,7 @@ Object { }, ], "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": Object { + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -4164,15 +4164,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -4183,12 +4183,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -4199,14 +4199,14 @@ Object { }, ], "peersCount": 1, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, ], - "global": Object { - "capabilities": Object { + "global": { + "capabilities": { "application": "V1_4_2", "channel": "V1_4_3", "isV2": false, @@ -4220,21 +4220,21 @@ Object { "fabricNodeenvVersion": "1.4", "fabricRecommendedNodeVersion": "12", "fabricVersion": "1.4.11", - "monitoring": Object { + "monitoring": { "loglevel": "info", }, - "paths": Object { + "paths": { "chaincodesBaseDir": "", "fabloConfig": "", }, "tls": false, - "tools": Object {}, + "tools": {}, }, - "hooks": Object { + "hooks": { "postGenerate": "", }, - "orderedHeadsDistinct": Array [ - Object { + "orderedHeadsDistinct": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -4245,16 +4245,16 @@ Object { "port": 7030, }, ], - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -4264,8 +4264,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -4276,8 +4276,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -4291,11 +4291,11 @@ Object { "profileName": "Group1Genesis", }, ], - "orgs": Array [ - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer.example.com", "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", @@ -4305,7 +4305,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer.example.com", }, "cryptoConfigFileName": "crypto-config-orderer", @@ -4313,17 +4313,17 @@ Object { "headPeer": undefined, "mspName": "OrdererMSP", "name": "Orderer", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -4334,8 +4334,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -4349,16 +4349,16 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4367,10 +4367,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -4380,8 +4380,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -4391,15 +4391,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4410,12 +4410,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4424,10 +4424,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -4438,14 +4438,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -4456,7 +4456,7 @@ Object { }, ], "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": Object { + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -4466,15 +4466,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -4485,12 +4485,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -4501,23 +4501,23 @@ Object { }, ], "peersCount": 1, - "tools": Object {}, + "tools": {}, }, ], } `; exports[`extend config samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -Object { - "chaincodes": Array [ - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4526,10 +4526,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -4539,8 +4539,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -4550,15 +4550,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4569,12 +4569,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4585,18 +4585,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -4606,8 +4606,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -4618,8 +4618,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -4629,7 +4629,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -4639,7 +4639,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -4652,7 +4652,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -4662,13 +4662,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4677,10 +4677,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -4690,8 +4690,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -4701,15 +4701,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4720,12 +4720,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4736,14 +4736,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -4752,10 +4752,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -4765,8 +4765,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -4776,15 +4776,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -4795,12 +4795,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -4811,20 +4811,20 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, "directory": "./chaincodes/chaincode-kv-node-1.4", "endorsement": "OR ('Org1MSP.member', 'Org2MSP.member')", - "init": "{\\"Args\\":[]}", - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "init": "{"Args":[]}", + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4833,10 +4833,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -4846,8 +4846,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -4857,15 +4857,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4876,12 +4876,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4892,22 +4892,22 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "lang": "node", "name": "chaincode1", - "privateData": Array [], + "privateData": [], "privateDataConfigFile": undefined, "version": "0.0.1", }, - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -4916,10 +4916,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -4929,8 +4929,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -4940,15 +4940,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -4959,12 +4959,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -4975,18 +4975,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel2", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -4996,8 +4996,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5008,8 +5008,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5019,7 +5019,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5029,7 +5029,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5042,7 +5042,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5052,13 +5052,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -5067,10 +5067,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5080,8 +5080,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -5091,15 +5091,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5110,12 +5110,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5126,14 +5126,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -5142,10 +5142,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -5155,8 +5155,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -5166,15 +5166,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -5185,12 +5185,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -5201,20 +5201,20 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel2", }, "directory": "./chaincodes/chaincode-java-simple", "endorsement": "OR ('Org1MSP.member', 'Org2MSP.member')", - "init": "{\\"Args\\":[]}", - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "init": "{"Args":[]}", + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -5223,10 +5223,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5236,8 +5236,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -5247,15 +5247,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5266,12 +5266,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5282,23 +5282,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "lang": "java", "name": "chaincode2", - "privateData": Array [], + "privateData": [], "privateDataConfigFile": undefined, "version": "0.0.1", }, ], - "channels": Array [ - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -5307,10 +5307,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5320,8 +5320,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -5331,15 +5331,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -5350,12 +5350,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -5366,18 +5366,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5387,8 +5387,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5399,8 +5399,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5410,7 +5410,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5420,7 +5420,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5433,7 +5433,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5443,13 +5443,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -5458,10 +5458,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5471,8 +5471,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -5482,15 +5482,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -5501,12 +5501,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -5517,14 +5517,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -5533,10 +5533,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -5546,8 +5546,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -5557,15 +5557,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -5576,12 +5576,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -5592,18 +5592,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -5612,10 +5612,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5625,8 +5625,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -5636,15 +5636,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5655,12 +5655,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5671,18 +5671,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel2", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5692,8 +5692,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5704,8 +5704,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5715,7 +5715,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5725,7 +5725,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5738,7 +5738,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5748,13 +5748,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -5763,10 +5763,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5776,8 +5776,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -5787,15 +5787,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5806,12 +5806,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -5822,14 +5822,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -5838,10 +5838,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -5851,8 +5851,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -5862,15 +5862,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -5881,12 +5881,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -5897,14 +5897,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel2", }, ], - "global": Object { - "capabilities": Object { + "global": { + "capabilities": { "application": "V1_4_2", "channel": "V1_4_3", "isV2": false, @@ -5918,21 +5918,21 @@ Object { "fabricNodeenvVersion": "1.4", "fabricRecommendedNodeVersion": "12", "fabricVersion": "1.4.6", - "monitoring": Object { + "monitoring": { "loglevel": "info", }, - "paths": Object { + "paths": { "chaincodesBaseDir": "", "fabloConfig": "", }, "tls": true, - "tools": Object {}, + "tools": {}, }, - "hooks": Object { + "hooks": { "postGenerate": "", }, - "orderedHeadsDistinct": Array [ - Object { + "orderedHeadsDistinct": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5943,16 +5943,16 @@ Object { "port": 7030, }, ], - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5962,8 +5962,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5974,8 +5974,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5985,7 +5985,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -5995,7 +5995,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -6009,11 +6009,11 @@ Object { "profileName": "Group1Genesis", }, ], - "orgs": Array [ - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer.example.com", "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", @@ -6023,7 +6023,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer.example.com", }, "cryptoConfigFileName": "crypto-config-orderer", @@ -6031,17 +6031,17 @@ Object { "headPeer": undefined, "mspName": "OrdererMSP", "name": "Orderer", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -6052,8 +6052,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -6063,7 +6063,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -6073,7 +6073,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -6087,16 +6087,16 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6105,10 +6105,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6118,8 +6118,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -6129,15 +6129,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6148,12 +6148,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6162,10 +6162,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6176,14 +6176,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -6192,10 +6192,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -6205,8 +6205,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -6216,15 +6216,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -6235,12 +6235,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -6249,10 +6249,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -6263,23 +6263,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], } `; exports[`extend config samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` -Object { - "chaincodes": Array [ - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6288,10 +6288,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6301,8 +6301,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -6312,15 +6312,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6331,12 +6331,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6345,10 +6345,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6359,18 +6359,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6380,8 +6380,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6392,8 +6392,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6406,7 +6406,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6416,13 +6416,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6431,10 +6431,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6444,8 +6444,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -6455,15 +6455,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6474,12 +6474,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6488,10 +6488,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6502,7 +6502,7 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", @@ -6510,12 +6510,12 @@ Object { "directory": "./chaincodes/chaincode-kv-node", "endorsement": undefined, "initRequired": false, - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6524,10 +6524,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6537,8 +6537,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -6548,15 +6548,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6567,12 +6567,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6581,10 +6581,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6595,23 +6595,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "lang": "node", "name": "chaincode1", - "privateData": Array [], + "privateData": [], "privateDataConfigFile": undefined, "version": "0.0.1", }, ], - "channels": Array [ - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6620,10 +6620,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6633,8 +6633,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -6644,15 +6644,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6663,12 +6663,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6677,10 +6677,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6691,18 +6691,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6712,8 +6712,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6724,8 +6724,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6738,7 +6738,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6748,13 +6748,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6763,10 +6763,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6776,8 +6776,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -6787,15 +6787,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6806,12 +6806,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -6820,10 +6820,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -6834,14 +6834,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, ], - "global": Object { - "capabilities": Object { + "global": { + "capabilities": { "application": "V2_0", "channel": "V2_0", "isV2": true, @@ -6855,21 +6855,21 @@ Object { "fabricNodeenvVersion": "2.4", "fabricRecommendedNodeVersion": "16", "fabricVersion": "2.4.7", - "monitoring": Object { + "monitoring": { "loglevel": "info", }, - "paths": Object { + "paths": { "chaincodesBaseDir": "", "fabloConfig": "", }, "tls": false, - "tools": Object {}, + "tools": {}, }, - "hooks": Object { + "hooks": { "postGenerate": "", }, - "orderedHeadsDistinct": Array [ - Object { + "orderedHeadsDistinct": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6880,16 +6880,16 @@ Object { "port": 7030, }, ], - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6899,8 +6899,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6911,8 +6911,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6926,11 +6926,11 @@ Object { "profileName": "Group1Genesis", }, ], - "orgs": Array [ - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer.example.com", "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", @@ -6940,7 +6940,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer.example.com", }, "cryptoConfigFileName": "crypto-config-orderer", @@ -6948,17 +6948,17 @@ Object { "headPeer": undefined, "mspName": "OrdererMSP", "name": "Orderer", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6969,8 +6969,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -6984,16 +6984,16 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7002,10 +7002,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7015,8 +7015,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -7026,15 +7026,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7045,12 +7045,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7059,10 +7059,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7073,23 +7073,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], } `; exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-k8s.json 1`] = ` -Object { - "chaincodes": Array [ - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7098,10 +7098,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7111,8 +7111,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -7122,15 +7122,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7141,12 +7141,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7155,10 +7155,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7169,18 +7169,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7190,8 +7190,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7202,8 +7202,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7216,7 +7216,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7226,13 +7226,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7241,10 +7241,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7254,8 +7254,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -7265,15 +7265,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7284,12 +7284,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7298,10 +7298,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7312,7 +7312,7 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", @@ -7320,12 +7320,12 @@ Object { "directory": "./chaincodes/chaincode-kv-node", "endorsement": undefined, "initRequired": false, - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7334,10 +7334,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7347,8 +7347,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -7358,15 +7358,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7377,12 +7377,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7391,10 +7391,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7405,23 +7405,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "lang": "node", "name": "chaincode1", - "privateData": Array [], + "privateData": [], "privateDataConfigFile": undefined, "version": "0.0.1", }, ], - "channels": Array [ - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7430,10 +7430,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7443,8 +7443,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -7454,15 +7454,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7473,12 +7473,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7487,10 +7487,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7501,18 +7501,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7522,8 +7522,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7534,8 +7534,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7548,7 +7548,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7558,13 +7558,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7573,10 +7573,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7586,8 +7586,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -7597,15 +7597,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7616,12 +7616,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7630,10 +7630,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7644,14 +7644,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, ], - "global": Object { - "capabilities": Object { + "global": { + "capabilities": { "application": "V2_0", "channel": "V2_0", "isV2": true, @@ -7665,21 +7665,21 @@ Object { "fabricNodeenvVersion": "2.4", "fabricRecommendedNodeVersion": "16", "fabricVersion": "2.4.7", - "monitoring": Object { + "monitoring": { "loglevel": "info", }, - "paths": Object { + "paths": { "chaincodesBaseDir": "", "fabloConfig": "", }, "tls": false, - "tools": Object {}, + "tools": {}, }, - "hooks": Object { + "hooks": { "postGenerate": "", }, - "orderedHeadsDistinct": Array [ - Object { + "orderedHeadsDistinct": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7690,16 +7690,16 @@ Object { "port": 7030, }, ], - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7709,8 +7709,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7721,8 +7721,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7736,11 +7736,11 @@ Object { "profileName": "Group1Genesis", }, ], - "orgs": Array [ - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer.example.com", "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", @@ -7750,7 +7750,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer.example.com", }, "cryptoConfigFileName": "crypto-config-orderer", @@ -7758,17 +7758,17 @@ Object { "headPeer": undefined, "mspName": "OrdererMSP", "name": "Orderer", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "solo", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7779,8 +7779,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "solo", "domain": "orderer.example.com", @@ -7794,16 +7794,16 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7812,10 +7812,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7825,8 +7825,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -7836,15 +7836,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7855,12 +7855,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -7869,10 +7869,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -7883,23 +7883,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], } `; exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` -Object { - "chaincodes": Array [ - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -7911,7 +7911,7 @@ Object { }, ], "bootstrapPeers": "peer0.org1.example.com:7041", - "ca": Object { + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -7921,15 +7921,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -7941,12 +7941,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -7958,15 +7958,15 @@ Object { }, ], "peersCount": 1, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7041", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "error": "console", "info": "console", "warn": "console", @@ -7977,15 +7977,15 @@ Object { }, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -7995,8 +7995,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8007,8 +8007,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8021,7 +8021,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8031,13 +8031,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8049,7 +8049,7 @@ Object { }, ], "bootstrapPeers": "peer0.org1.example.com:7041", - "ca": Object { + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -8059,15 +8059,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8079,12 +8079,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8096,15 +8096,15 @@ Object { }, ], "peersCount": 1, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7041", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "error": "console", "info": "console", "warn": "console", @@ -8120,12 +8120,12 @@ Object { "directory": "./chaincodes/chaincode-kv-node", "endorsement": undefined, "initRequired": false, - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8137,7 +8137,7 @@ Object { }, ], "bootstrapPeers": "peer0.org1.example.com:7041", - "ca": Object { + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -8147,15 +8147,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8167,12 +8167,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8184,15 +8184,15 @@ Object { }, ], "peersCount": 1, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7041", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "error": "console", "info": "console", "warn": "console", @@ -8204,19 +8204,19 @@ Object { }, "lang": "node", "name": "chaincode1", - "privateData": Array [], + "privateData": [], "privateDataConfigFile": undefined, "version": "0.0.1", }, ], - "channels": Array [ - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8228,7 +8228,7 @@ Object { }, ], "bootstrapPeers": "peer0.org1.example.com:7041", - "ca": Object { + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -8238,15 +8238,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8258,12 +8258,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8275,15 +8275,15 @@ Object { }, ], "peersCount": 1, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7041", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "error": "console", "info": "console", "warn": "console", @@ -8294,15 +8294,15 @@ Object { }, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8312,8 +8312,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8324,8 +8324,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8338,7 +8338,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8348,13 +8348,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8366,7 +8366,7 @@ Object { }, ], "bootstrapPeers": "peer0.org1.example.com:7041", - "ca": Object { + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -8376,15 +8376,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8396,12 +8396,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8413,15 +8413,15 @@ Object { }, ], "peersCount": 1, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7041", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "error": "console", "info": "console", "warn": "console", @@ -8435,8 +8435,8 @@ Object { "profileName": "MyChannel1", }, ], - "global": Object { - "capabilities": Object { + "global": { + "capabilities": { "application": "V2_0", "channel": "V2_0", "isV2": true, @@ -8450,26 +8450,26 @@ Object { "fabricNodeenvVersion": "2.3", "fabricRecommendedNodeVersion": "12", "fabricVersion": "2.3.3", - "monitoring": Object { + "monitoring": { "loglevel": "info", }, - "paths": Object { + "paths": { "chaincodesBaseDir": "", "fabloConfig": "", }, "tls": true, - "tools": Object { - "explorer": Object { + "tools": { + "explorer": { "address": "explorer.example.com", "port": 7010, }, }, }, - "hooks": Object { - "postGenerate": "perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' \\"./fablo-target/fabric-config/configtx.yaml\\"", + "hooks": { + "postGenerate": "perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' "./fablo-target/fabric-config/configtx.yaml"", }, - "orderedHeadsDistinct": Array [ - Object { + "orderedHeadsDistinct": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8480,16 +8480,16 @@ Object { "port": 7030, }, ], - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8499,8 +8499,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8511,8 +8511,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8526,11 +8526,11 @@ Object { "profileName": "Group1Genesis", }, ], - "orgs": Array [ - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer.example.com", "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", @@ -8540,7 +8540,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer.example.com", }, "cryptoConfigFileName": "crypto-config-orderer", @@ -8548,17 +8548,17 @@ Object { "headPeer": undefined, "mspName": "OrdererMSP", "name": "Orderer", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8569,8 +8569,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -8584,16 +8584,16 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8605,7 +8605,7 @@ Object { }, ], "bootstrapPeers": "peer0.org1.example.com:7041", - "ca": Object { + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -8615,15 +8615,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8635,12 +8635,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "image": "couchdb:\${COUCHDB_VERSION}", "type": "CouchDb", }, @@ -8652,15 +8652,15 @@ Object { }, ], "peersCount": 1, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7041", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "error": "console", "info": "console", "warn": "console", @@ -8675,16 +8675,16 @@ Object { `; exports[`extend config samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` -Object { - "chaincodes": Array [ - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -8693,10 +8693,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -8706,8 +8706,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -8717,15 +8717,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -8736,12 +8736,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -8752,15 +8752,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -8772,15 +8772,15 @@ Object { }, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer1", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -8790,8 +8790,8 @@ Object { "orgName": "Orderer1", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -8802,8 +8802,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -8813,7 +8813,7 @@ Object { "orgName": "Orderer1", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -8823,7 +8823,7 @@ Object { "orgName": "Orderer1", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -8836,7 +8836,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -8846,13 +8846,13 @@ Object { "orgName": "Orderer1", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -8861,10 +8861,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -8874,8 +8874,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -8885,15 +8885,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -8904,12 +8904,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -8920,15 +8920,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -8939,12 +8939,12 @@ Object { }, }, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -8953,10 +8953,10 @@ Object { "name": "peer0", "port": 7081, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -8966,8 +8966,8 @@ Object { "port": 7082, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7081 peer1.org2.example.com:7082"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -8977,15 +8977,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -8996,12 +8996,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -9012,7 +9012,7 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", @@ -9020,12 +9020,12 @@ Object { "directory": "./chaincodes/chaincode-kv-node", "endorsement": "OR ('Org1MSP.member', 'Org2MSP.member')", "initRequired": false, - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9034,10 +9034,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9047,8 +9047,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -9058,15 +9058,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9077,12 +9077,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9093,15 +9093,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -9114,18 +9114,18 @@ Object { }, "lang": "node", "name": "chaincode1", - "privateData": Array [], + "privateData": [], "privateDataConfigFile": undefined, "version": "0.0.1", }, - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9134,10 +9134,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9147,8 +9147,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -9158,15 +9158,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9177,12 +9177,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9193,15 +9193,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -9213,15 +9213,15 @@ Object { }, }, "name": "my-channel2", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer1", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9231,8 +9231,8 @@ Object { "orgName": "Orderer1", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9243,8 +9243,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9254,7 +9254,7 @@ Object { "orgName": "Orderer1", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9264,7 +9264,7 @@ Object { "orgName": "Orderer1", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9277,7 +9277,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9287,13 +9287,13 @@ Object { "orgName": "Orderer1", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9302,10 +9302,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9315,8 +9315,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -9326,15 +9326,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9345,12 +9345,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9361,15 +9361,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -9380,12 +9380,12 @@ Object { }, }, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -9394,10 +9394,10 @@ Object { "name": "peer0", "port": 7081, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -9407,8 +9407,8 @@ Object { "port": 7082, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7081 peer1.org2.example.com:7082"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -9418,15 +9418,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -9437,12 +9437,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -9453,7 +9453,7 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel2", @@ -9461,12 +9461,12 @@ Object { "directory": "./chaincodes/chaincode-java-simple", "endorsement": "OR ('Org1MSP.member', 'Org2MSP.member')", "initRequired": false, - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9475,10 +9475,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9488,8 +9488,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -9499,15 +9499,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9518,12 +9518,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9534,15 +9534,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -9555,19 +9555,19 @@ Object { }, "lang": "java", "name": "chaincode2", - "privateData": Array [], + "privateData": [], "privateDataConfigFile": undefined, "version": "0.0.1", }, ], - "channels": Array [ - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9576,10 +9576,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9589,8 +9589,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -9600,15 +9600,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9619,12 +9619,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9635,15 +9635,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -9655,15 +9655,15 @@ Object { }, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer1", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9673,8 +9673,8 @@ Object { "orgName": "Orderer1", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9685,8 +9685,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9696,7 +9696,7 @@ Object { "orgName": "Orderer1", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9706,7 +9706,7 @@ Object { "orgName": "Orderer1", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9719,7 +9719,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -9729,13 +9729,13 @@ Object { "orgName": "Orderer1", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9744,10 +9744,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9757,8 +9757,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -9768,15 +9768,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9787,12 +9787,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9803,15 +9803,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -9822,12 +9822,12 @@ Object { }, }, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -9836,10 +9836,10 @@ Object { "name": "peer0", "port": 7081, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -9849,8 +9849,8 @@ Object { "port": 7082, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7081 peer1.org2.example.com:7082"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -9860,15 +9860,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -9879,12 +9879,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -9895,18 +9895,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -9915,10 +9915,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9928,8 +9928,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -9939,15 +9939,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9958,12 +9958,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -9974,15 +9974,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -9994,15 +9994,15 @@ Object { }, }, "name": "my-channel2", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer1", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10012,8 +10012,8 @@ Object { "orgName": "Orderer1", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10024,8 +10024,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10035,7 +10035,7 @@ Object { "orgName": "Orderer1", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10045,7 +10045,7 @@ Object { "orgName": "Orderer1", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10058,7 +10058,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10068,13 +10068,13 @@ Object { "orgName": "Orderer1", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -10083,10 +10083,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -10096,8 +10096,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -10107,15 +10107,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -10126,12 +10126,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -10142,15 +10142,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -10161,12 +10161,12 @@ Object { }, }, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -10175,10 +10175,10 @@ Object { "name": "peer0", "port": 7081, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -10188,8 +10188,8 @@ Object { "port": 7082, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7081 peer1.org2.example.com:7082"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -10199,15 +10199,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -10218,12 +10218,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -10234,18 +10234,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel2", }, - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -10254,10 +10254,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -10267,8 +10267,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -10278,15 +10278,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -10297,12 +10297,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -10311,10 +10311,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -10325,15 +10325,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -10345,15 +10345,15 @@ Object { }, }, "name": "my-channel3", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group2Defaults", "consensus": "solo", "genesisBlockName": "Group2Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer2", ], "name": "group2", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group2.orderer2.com", "consensus": "solo", "domain": "orderer2.com", @@ -10363,8 +10363,8 @@ Object { "orgName": "Orderer2", "port": 7050, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group2.orderer2.com", "consensus": "solo", "domain": "orderer2.com", @@ -10375,8 +10375,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group2.orderer2.com", "consensus": "solo", "domain": "orderer2.com", @@ -10389,7 +10389,7 @@ Object { ], "profileName": "Group2Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group2.orderer2.com", "consensus": "solo", "domain": "orderer2.com", @@ -10399,13 +10399,13 @@ Object { "orgName": "Orderer2", "port": 7050, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -10414,10 +10414,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -10427,8 +10427,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -10438,15 +10438,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -10457,12 +10457,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -10471,10 +10471,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -10485,15 +10485,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -10504,12 +10504,12 @@ Object { }, }, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -10518,10 +10518,10 @@ Object { "name": "peer0", "port": 7081, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -10531,8 +10531,8 @@ Object { "port": 7082, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7081 peer1.org2.example.com:7082"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -10542,15 +10542,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -10561,12 +10561,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -10575,10 +10575,10 @@ Object { "name": "peer0", "port": 7081, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -10589,14 +10589,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel3", }, ], - "global": Object { - "capabilities": Object { + "global": { + "capabilities": { "application": "V2_0", "channel": "V2_0", "isV2": true, @@ -10610,21 +10610,21 @@ Object { "fabricNodeenvVersion": "2.4", "fabricRecommendedNodeVersion": "16", "fabricVersion": "2.4.3", - "monitoring": Object { + "monitoring": { "loglevel": "debug", }, - "paths": Object { + "paths": { "chaincodesBaseDir": "", "fabloConfig": "", }, "tls": true, - "tools": Object {}, + "tools": {}, }, - "hooks": Object { - "postGenerate": "perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' \\"./fablo-target/fabric-config/configtx.yaml\\"", + "hooks": { + "postGenerate": "perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' "./fablo-target/fabric-config/configtx.yaml"", }, - "orderedHeadsDistinct": Array [ - Object { + "orderedHeadsDistinct": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10634,7 +10634,7 @@ Object { "orgName": "Orderer1", "port": 7030, }, - Object { + { "address": "orderer0.group2.orderer2.com", "consensus": "solo", "domain": "orderer2.com", @@ -10645,16 +10645,16 @@ Object { "port": 7050, }, ], - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer1", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10664,8 +10664,8 @@ Object { "orgName": "Orderer1", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10676,8 +10676,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10687,7 +10687,7 @@ Object { "orgName": "Orderer1", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10697,7 +10697,7 @@ Object { "orgName": "Orderer1", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10710,15 +10710,15 @@ Object { ], "profileName": "Group1Genesis", }, - Object { + { "configtxOrdererDefaults": "Group2Defaults", "consensus": "solo", "genesisBlockName": "Group2Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer2", ], "name": "group2", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group2.orderer2.com", "consensus": "solo", "domain": "orderer2.com", @@ -10728,8 +10728,8 @@ Object { "orgName": "Orderer2", "port": 7050, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group2.orderer2.com", "consensus": "solo", "domain": "orderer2.com", @@ -10740,8 +10740,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group2.orderer2.com", "consensus": "solo", "domain": "orderer2.com", @@ -10755,11 +10755,11 @@ Object { "profileName": "Group2Genesis", }, ], - "orgs": Array [ - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer1.com", "caAdminNameVar": "ORDERER1_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER1_CA_ADMIN_PASSWORD", @@ -10769,7 +10769,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer1.com", }, "cryptoConfigFileName": "crypto-config-orderer1", @@ -10777,17 +10777,17 @@ Object { "headPeer": undefined, "mspName": "Orderer1MSP", "name": "Orderer1", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer1", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10798,8 +10798,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10809,7 +10809,7 @@ Object { "orgName": "Orderer1", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10819,7 +10819,7 @@ Object { "orgName": "Orderer1", "port": 7031, }, - Object { + { "address": "orderer2.group1.orderer1.com", "consensus": "etcdraft", "domain": "orderer1.com", @@ -10833,14 +10833,14 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer2.com", "caAdminNameVar": "ORDERER2_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER2_CA_ADMIN_PASSWORD", @@ -10850,7 +10850,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer2.com", }, "cryptoConfigFileName": "crypto-config-orderer2", @@ -10858,17 +10858,17 @@ Object { "headPeer": undefined, "mspName": "Orderer2MSP", "name": "Orderer2", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group2Defaults", "consensus": "solo", "genesisBlockName": "Group2Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer2", ], "name": "group2", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group2.orderer2.com", "consensus": "solo", "domain": "orderer2.com", @@ -10879,8 +10879,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group2.orderer2.com", "consensus": "solo", "domain": "orderer2.com", @@ -10894,16 +10894,16 @@ Object { "profileName": "Group2Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -10912,10 +10912,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -10925,8 +10925,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7061 peer1.org1.example.com:7062"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -10936,15 +10936,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -10955,12 +10955,12 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7061", @@ -10969,10 +10969,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7062", @@ -10983,15 +10983,15 @@ Object { }, ], "peersCount": 2, - "tools": Object { - "fabloRest": Object { + "tools": { + "fabloRest": { "address": "fablo-rest.org1.example.com", "discoverySslTargetNameOverrides": "", "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", "fabricCaName": "ca.org1.example.com", "fabricCaUrl": "https://ca.org1.example.com:7054", - "logging": Object { + "logging": { "debug": "console", "error": "console", "info": "console", @@ -11002,12 +11002,12 @@ Object { }, }, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -11016,10 +11016,10 @@ Object { "name": "peer0", "port": 7081, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -11029,8 +11029,8 @@ Object { "port": 7082, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7081 peer1.org2.example.com:7082"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -11040,15 +11040,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -11059,12 +11059,12 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [], - "peers": Array [ - Object { + "ordererGroups": [], + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7081", @@ -11073,10 +11073,10 @@ Object { "name": "peer0", "port": 7081, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7082", @@ -11087,23 +11087,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], } `; exports[`extend config samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` -Object { - "chaincodes": Array [ - Object { - "channel": Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11112,10 +11112,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -11125,8 +11125,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -11136,15 +11136,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11155,17 +11155,17 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org1", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11176,8 +11176,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11187,7 +11187,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11201,11 +11201,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11214,10 +11214,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -11228,21 +11228,21 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", "Org1", "Org2", "Org3", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -11252,8 +11252,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -11263,7 +11263,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11273,7 +11273,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -11283,7 +11283,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -11294,8 +11294,8 @@ Object { "port": 7090, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -11305,7 +11305,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -11315,7 +11315,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11325,7 +11325,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11335,7 +11335,7 @@ Object { "orgName": "Org1", "port": 7051, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -11345,7 +11345,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer1.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -11355,7 +11355,7 @@ Object { "orgName": "Org2", "port": 7071, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -11365,7 +11365,7 @@ Object { "orgName": "Org3", "port": 7090, }, - Object { + { "address": "orderer1.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -11378,7 +11378,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -11388,13 +11388,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11403,10 +11403,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -11416,8 +11416,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -11427,15 +11427,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11446,17 +11446,17 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org1", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11467,8 +11467,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11478,7 +11478,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11492,11 +11492,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11505,10 +11505,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -11519,7 +11519,7 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", @@ -11527,12 +11527,12 @@ Object { "directory": "./chaincodes/chaincode-kv-node", "endorsement": undefined, "initRequired": false, - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11541,10 +11541,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -11554,8 +11554,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -11565,15 +11565,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11584,17 +11584,17 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org1", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11605,8 +11605,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11616,7 +11616,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11630,11 +11630,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11643,10 +11643,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -11657,23 +11657,23 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "lang": "node", "name": "chaincode1", - "privateData": Array [], + "privateData": [], "privateDataConfigFile": undefined, "version": "0.0.1", }, ], - "channels": Array [ - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11682,10 +11682,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -11695,8 +11695,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -11706,15 +11706,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11725,17 +11725,17 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org1", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11746,8 +11746,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11757,7 +11757,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11771,11 +11771,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11784,10 +11784,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -11798,21 +11798,21 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel1", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", "Org1", "Org2", "Org3", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -11822,8 +11822,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -11833,7 +11833,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11843,7 +11843,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -11853,7 +11853,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -11864,8 +11864,8 @@ Object { "port": 7090, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -11875,7 +11875,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -11885,7 +11885,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11895,7 +11895,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -11905,7 +11905,7 @@ Object { "orgName": "Org1", "port": 7051, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -11915,7 +11915,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer1.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -11925,7 +11925,7 @@ Object { "orgName": "Org2", "port": 7071, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -11935,7 +11935,7 @@ Object { "orgName": "Org3", "port": 7090, }, - Object { + { "address": "orderer1.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -11948,7 +11948,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -11958,13 +11958,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -11973,10 +11973,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -11986,8 +11986,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -11997,15 +11997,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -12016,17 +12016,17 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org1", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12037,8 +12037,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12048,7 +12048,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12062,11 +12062,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -12075,10 +12075,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -12089,18 +12089,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel1", }, - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -12109,10 +12109,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -12122,8 +12122,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -12133,15 +12133,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -12152,17 +12152,17 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org2", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12173,8 +12173,8 @@ Object { "port": 7070, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12184,7 +12184,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer1.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12198,11 +12198,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -12211,10 +12211,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -12225,21 +12225,21 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel2", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", "Org1", "Org2", "Org3", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -12249,8 +12249,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -12260,7 +12260,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12270,7 +12270,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12280,7 +12280,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -12291,8 +12291,8 @@ Object { "port": 7090, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -12302,7 +12302,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -12312,7 +12312,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12322,7 +12322,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12332,7 +12332,7 @@ Object { "orgName": "Org1", "port": 7051, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12342,7 +12342,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer1.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12352,7 +12352,7 @@ Object { "orgName": "Org2", "port": 7071, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -12362,7 +12362,7 @@ Object { "orgName": "Org3", "port": 7090, }, - Object { + { "address": "orderer1.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -12375,7 +12375,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -12385,13 +12385,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -12400,10 +12400,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -12413,8 +12413,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -12424,15 +12424,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -12443,17 +12443,17 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org2", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12464,8 +12464,8 @@ Object { "port": 7070, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12475,7 +12475,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer1.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12489,11 +12489,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -12502,10 +12502,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -12516,18 +12516,18 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel2", }, - Object { - "instantiatingOrg": Object { - "anchorPeers": Array [ - Object { + { + "instantiatingOrg": { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -12536,10 +12536,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -12549,8 +12549,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -12560,15 +12560,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -12579,17 +12579,17 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org1", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12600,8 +12600,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12611,7 +12611,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12625,11 +12625,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -12638,10 +12638,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -12652,21 +12652,21 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, "name": "my-channel3", - "ordererGroup": Object { + "ordererGroup": { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", "Org1", "Org2", "Org3", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -12676,8 +12676,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -12687,7 +12687,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12697,7 +12697,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12707,7 +12707,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -12718,8 +12718,8 @@ Object { "port": 7090, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -12729,7 +12729,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -12739,7 +12739,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12749,7 +12749,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12759,7 +12759,7 @@ Object { "orgName": "Org1", "port": 7051, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12769,7 +12769,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer1.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -12779,7 +12779,7 @@ Object { "orgName": "Org2", "port": 7071, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -12789,7 +12789,7 @@ Object { "orgName": "Org3", "port": 7090, }, - Object { + { "address": "orderer1.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -12802,7 +12802,7 @@ Object { ], "profileName": "Group1Genesis", }, - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -12812,13 +12812,13 @@ Object { "orgName": "Orderer", "port": 7030, }, - "orgs": Array [ - Object { - "anchorPeers": Array [ - Object { + "orgs": [ + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -12827,10 +12827,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -12840,8 +12840,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -12851,15 +12851,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -12870,17 +12870,17 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org1", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12891,8 +12891,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12902,7 +12902,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -12916,11 +12916,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -12929,10 +12929,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -12943,14 +12943,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -12959,10 +12959,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -12972,8 +12972,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -12983,15 +12983,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -13002,17 +13002,17 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org2", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -13023,8 +13023,8 @@ Object { "port": 7070, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -13034,7 +13034,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer1.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -13048,11 +13048,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -13061,10 +13061,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -13075,14 +13075,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], "profileName": "MyChannel3", }, ], - "global": Object { - "capabilities": Object { + "global": { + "capabilities": { "application": "V2_0", "channel": "V2_0", "isV2": true, @@ -13096,26 +13096,26 @@ Object { "fabricNodeenvVersion": "2.3", "fabricRecommendedNodeVersion": "12", "fabricVersion": "2.3.2", - "monitoring": Object { + "monitoring": { "loglevel": "info", }, - "paths": Object { + "paths": { "chaincodesBaseDir": "", "fabloConfig": "", }, "tls": true, - "tools": Object { - "explorer": Object { + "tools": { + "explorer": { "address": "explorer.example.com", "port": 7010, }, }, }, - "hooks": Object { + "hooks": { "postGenerate": "", }, - "orderedHeadsDistinct": Array [ - Object { + "orderedHeadsDistinct": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -13125,7 +13125,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -13135,7 +13135,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -13145,7 +13145,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -13156,19 +13156,19 @@ Object { "port": 7090, }, ], - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", "Org1", "Org2", "Org3", ], "name": "group1", - "ordererHead": Object { + "ordererHead": { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -13178,8 +13178,8 @@ Object { "orgName": "Orderer", "port": 7030, }, - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -13189,7 +13189,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -13199,7 +13199,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -13209,7 +13209,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -13220,8 +13220,8 @@ Object { "port": 7090, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -13231,7 +13231,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -13241,7 +13241,7 @@ Object { "orgName": "Orderer", "port": 7031, }, - Object { + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -13251,7 +13251,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -13261,7 +13261,7 @@ Object { "orgName": "Org1", "port": 7051, }, - Object { + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -13271,7 +13271,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer1.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -13281,7 +13281,7 @@ Object { "orgName": "Org2", "port": 7071, }, - Object { + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -13291,7 +13291,7 @@ Object { "orgName": "Org3", "port": 7090, }, - Object { + { "address": "orderer1.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -13305,11 +13305,11 @@ Object { "profileName": "Group1Genesis", }, ], - "orgs": Array [ - Object { - "anchorPeers": Array [], - "bootstrapPeers": "\\"\\"", - "ca": Object { + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { "address": "ca.orderer.example.com", "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", @@ -13319,7 +13319,7 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.orderer.example.com", }, "cryptoConfigFileName": "crypto-config-orderer", @@ -13327,17 +13327,17 @@ Object { "headPeer": undefined, "mspName": "OrdererMSP", "name": "Orderer", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Orderer", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -13348,8 +13348,8 @@ Object { "port": 7030, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -13359,7 +13359,7 @@ Object { "orgName": "Orderer", "port": 7030, }, - Object { + { "address": "orderer1.group1.orderer.example.com", "consensus": "etcdraft", "domain": "orderer.example.com", @@ -13373,16 +13373,16 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [], + "peers": [], "peersCount": 0, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -13391,10 +13391,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -13404,8 +13404,8 @@ Object { "port": 7042, }, ], - "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { "address": "ca.org1.example.com", "caAdminNameVar": "ORG1_CA_ADMIN_NAME", "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", @@ -13415,15 +13415,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org1.example.com", }, "cryptoConfigFileName": "crypto-config-org1", "domain": "org1.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -13434,17 +13434,17 @@ Object { }, "mspName": "Org1MSP", "name": "Org1", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org1", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -13455,8 +13455,8 @@ Object { "port": 7050, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -13466,7 +13466,7 @@ Object { "orgName": "Org1", "port": 7050, }, - Object { + { "address": "orderer1.group1.org1.example.com", "consensus": "etcdraft", "domain": "org1.example.com", @@ -13480,11 +13480,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org1.example.com", "couchDbExposePort": 5100, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org1.example.com:7041", @@ -13493,10 +13493,10 @@ Object { "name": "peer0", "port": 7041, }, - Object { + { "address": "peer1.org1.example.com", "couchDbExposePort": 5101, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org1.example.com:7042", @@ -13507,14 +13507,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -13523,10 +13523,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -13536,8 +13536,8 @@ Object { "port": 7062, }, ], - "bootstrapPeers": "\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", + "ca": { "address": "ca.org2.example.com", "caAdminNameVar": "ORG2_CA_ADMIN_NAME", "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", @@ -13547,15 +13547,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org2.example.com", }, "cryptoConfigFileName": "crypto-config-org2", "domain": "org2.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -13566,17 +13566,17 @@ Object { }, "mspName": "Org2MSP", "name": "Org2", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org2", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -13587,8 +13587,8 @@ Object { "port": 7070, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -13598,7 +13598,7 @@ Object { "orgName": "Org2", "port": 7070, }, - Object { + { "address": "orderer1.group1.org2.example.com", "consensus": "etcdraft", "domain": "org2.example.com", @@ -13612,11 +13612,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org2.example.com", "couchDbExposePort": 5120, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org2.example.com:7061", @@ -13625,10 +13625,10 @@ Object { "name": "peer0", "port": 7061, }, - Object { + { "address": "peer1.org2.example.com", "couchDbExposePort": 5121, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org2.example.com:7062", @@ -13639,14 +13639,14 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, - Object { - "anchorPeers": Array [ - Object { + { + "anchorPeers": [ + { "address": "peer0.org3.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org3.example.com:7081", @@ -13655,10 +13655,10 @@ Object { "name": "peer0", "port": 7081, }, - Object { + { "address": "peer1.org3.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org3.example.com:7082", @@ -13668,8 +13668,8 @@ Object { "port": 7082, }, ], - "bootstrapPeers": "\\"peer0.org3.example.com:7081 peer1.org3.example.com:7082\\"", - "ca": Object { + "bootstrapPeers": ""peer0.org3.example.com:7081 peer1.org3.example.com:7082"", + "ca": { "address": "ca.org3.example.com", "caAdminNameVar": "ORG3_CA_ADMIN_NAME", "caAdminPassVar": "ORG3_CA_ADMIN_PASSWORD", @@ -13679,15 +13679,15 @@ Object { "port": 7054, "prefix": "ca", }, - "cli": Object { + "cli": { "address": "cli.org3.example.com", }, "cryptoConfigFileName": "crypto-config-org3", "domain": "org3.example.com", - "headPeer": Object { + "headPeer": { "address": "peer0.org3.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org3.example.com:7081", @@ -13698,17 +13698,17 @@ Object { }, "mspName": "Org3MSP", "name": "Org3", - "ordererGroups": Array [ - Object { + "ordererGroups": [ + { "configtxOrdererDefaults": "Group1Defaults", "consensus": "etcdraft", "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": Array [ + "hostingOrgs": [ "Org3", ], "name": "group1", - "ordererHeads": Array [ - Object { + "ordererHeads": [ + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -13719,8 +13719,8 @@ Object { "port": 7090, }, ], - "orderers": Array [ - Object { + "orderers": [ + { "address": "orderer0.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -13730,7 +13730,7 @@ Object { "orgName": "Org3", "port": 7090, }, - Object { + { "address": "orderer1.group1.org3.example.com", "consensus": "etcdraft", "domain": "org3.example.com", @@ -13744,11 +13744,11 @@ Object { "profileName": "Group1Genesis", }, ], - "peers": Array [ - Object { + "peers": [ + { "address": "peer0.org3.example.com", "couchDbExposePort": 5140, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer0.org3.example.com:7081", @@ -13757,10 +13757,10 @@ Object { "name": "peer0", "port": 7081, }, - Object { + { "address": "peer1.org3.example.com", "couchDbExposePort": 5141, - "db": Object { + "db": { "type": "LevelDb", }, "fullAddress": "peer1.org3.example.com:7082", @@ -13771,7 +13771,7 @@ Object { }, ], "peersCount": 2, - "tools": Object {}, + "tools": {}, }, ], } diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index cd7c3b36..1bb5db87 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -9,18 +9,18 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/collections/chaincode1.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` "[ { - \\"name\\": \\"org1-collection\\", - \\"policy\\": \\"OR('Org1MSP.member')\\", - \\"requiredPeerCount\\": 1, - \\"maxPeerCount\\": 3, - \\"blockToLive\\": 0 + "name": "org1-collection", + "policy": "OR('Org1MSP.member')", + "requiredPeerCount": 1, + "maxPeerCount": 3, + "blockToLive": 0 }, { - \\"name\\": \\"org2-collection\\", - \\"policy\\": \\"OR('Org2MSP.member')\\", - \\"requiredPeerCount\\": 1, - \\"maxPeerCount\\": 3, - \\"blockToLive\\": 0 + "name": "org2-collection", + "policy": "OR('Org2MSP.member')", + "requiredPeerCount": 1, + "maxPeerCount": 3, + "blockToLive": 0 } ]" `; @@ -44,13 +44,13 @@ Channel: &ChannelDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Capabilities: <<: *ChannelCapabilities @@ -66,16 +66,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Writers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Admins: Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" + Rule: "OR('OrdererMSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" AnchorPeers: @@ -87,16 +87,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" + Rule: "OR('Org1MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" AnchorPeers: - Host: peer0.org1.example.com @@ -113,16 +113,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org2MSP.admin')\\" + Rule: "OR('Org2MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" AnchorPeers: - Host: peer0.org2.example.com @@ -139,16 +139,16 @@ Application: &ApplicationDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" + Rule: "MAJORITY Endorsement" Capabilities: <<: *ApplicationCapabilities @@ -171,18 +171,18 @@ Orderer: &Group1Defaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" # BlockValidation specifies what signatures must be included in the block # from the orderer for the peer to validate it. BlockValidation: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Capabilities: <<: *OrdererCapabilities @@ -233,42 +233,42 @@ Profiles: exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" + "name": "fablo-test-network-orderer", + "description": "Connection profile for Orderer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer" }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" + "organizations": { + "Orderer": { + "mspid": "OrdererMSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" + "certificateAuthorities": [ + "ca.orderer.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" } }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.orderer.example.com": { + "url": "http://localhost:7020", + "caName": "ca.orderer.example.com", + "httpOptions": { + "verify": false } } } @@ -309,42 +309,42 @@ certificateAuthorities: exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Org1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1" }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" + "certificateAuthorities": [ + "ca.org1.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" } }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.org1.example.com": { + "url": "http://localhost:7040", + "caName": "ca.org1.example.com", + "httpOptions": { + "verify": false } } } @@ -385,42 +385,42 @@ certificateAuthorities: exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Org2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\" + "name": "fablo-test-network-org2", + "description": "Connection profile for Org2 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org2" }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" + "organizations": { + "Org2": { + "mspid": "Org2MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org2.example.com\\" + "certificateAuthorities": [ + "ca.org2.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" } }, - \\"certificateAuthorities\\": { - \\"ca.org2.example.com\\": { - \\"url\\": \\"http://localhost:7060\\", - \\"caName\\": \\"ca.org2.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.org2.example.com": { + "url": "http://localhost:7060", + "caName": "ca.org2.example.com", + "httpOptions": { + "verify": false } } } @@ -498,17 +498,17 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" }, - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + "network-org2": { + "name": "Network of Org2", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; @@ -527,14 +527,14 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -542,9 +542,9 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -562,7 +562,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -629,11 +629,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -645,25 +645,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -684,7 +684,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -703,11 +703,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -719,7 +719,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -727,9 +727,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -761,18 +761,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -801,7 +801,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -822,7 +822,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -878,7 +878,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -906,12 +906,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1028,14 +1028,14 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1043,9 +1043,9 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1063,7 +1063,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1130,11 +1130,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1146,25 +1146,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1185,7 +1185,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1204,11 +1204,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1220,7 +1220,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1228,9 +1228,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1262,18 +1262,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1302,7 +1302,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1323,7 +1323,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1379,7 +1379,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1407,12 +1407,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1529,14 +1529,14 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1544,9 +1544,9 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1564,7 +1564,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1631,11 +1631,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1647,25 +1647,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1686,7 +1686,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1705,11 +1705,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1721,7 +1721,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1729,9 +1729,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1763,18 +1763,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1803,7 +1803,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1824,7 +1824,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1880,7 +1880,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1908,12 +1908,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -2021,16 +2021,16 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c set -eu -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/.env" +source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" networkUp() { generateArtifacts @@ -2042,45 +2042,45 @@ networkUp() { printStartSuccessInfo } -if [ \\"$1\\" = \\"up\\" ]; then +if [ "$1" = "up" ]; then networkUp -elif [ \\"$1\\" = \\"down\\" ]; then +elif [ "$1" = "down" ]; then networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then +elif [ "$1" = "reset" ]; then networkDown networkUp -elif [ \\"$1\\" = \\"start\\" ]; then +elif [ "$1" = "start" ]; then startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then +elif [ "$1" = "stop" ]; then stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then + chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then +elif [ "$1" = "--help" ]; then printHelp else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" fi " `; @@ -2128,29 +2128,29 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c "#!/usr/bin/env bash chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + elif [ "$1" = "peer0.org1.example.com" ]; then - peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" # $2 is channel name elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + [ "$1" = "peer1.org1.example.com" ] then - peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" # $2 is channel name elif - [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + [ "$1" = "peer0.org2.example.com" ] then - peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org2.example.com" "peer0.org2.example.com:7061" "$2" # $2 is channel name else - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" exit 1 fi @@ -2163,35 +2163,35 @@ chaincodeList() { # 4. chaincode command # 5. transient data (optional) chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" exit 1 fi - cli=\\"\\" - peer_addresses=\\"\\" + cli="" + peer_addresses="" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + if [[ "$1" == *"peer0.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer0.org1.example.com:7041" fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + if [[ "$1" == *"peer1.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer1.org1.example.com:7042" fi - if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + if [[ "$1" == *"peer0.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer0.org2.example.com:7061" fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" exit 1 fi - peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + peerChaincodeInvoke "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" } " @@ -2200,138 +2200,138 @@ chaincodeInvoke() { exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` "#!/usr/bin/env bash -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" set -eu channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" + echo "-> Channel query: " + "$@" - if [ \\"$#\\" -eq 1 ]; then + if [ "$#" -eq 1 ]; then printChannelsHelp - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - peerChannelList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + peerChannelList "cli.org1.example.com" "peer0.org1.example.com:7041" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] then - peerChannelList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + peerChannelList "cli.org1.example.com" "peer1.org1.example.com:7042" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] then - peerChannelList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + peerChannelList "cli.org2.example.com" "peer0.org2.example.com:7061" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" + peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] then - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer1.org1.example.com:7042" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" + peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] then - peerChannelGetInfo \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + peerChannelGetInfo "my-channel1" "cli.org2.example.com" "peer0.org2.example.com:7061" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" + peerChannelFetchConfig "my-channel1" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel1" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "$TARGET_FILE" else - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + echo "$@" + echo "$1, $2, $3, $4, $5, $6, $7, $#" printChannelsHelp fi } printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" + echo "Channel management commands:" + echo "" + + echo "fablo channel list org1 peer0" + echo -e "\\t List channels on 'peer0' of 'Org1'". + echo "" + + echo "fablo channel list org1 peer1" + echo -e "\\t List channels on 'peer1' of 'Org1'". + echo "" + + echo "fablo channel list org2 peer0" + echo -e "\\t List channels on 'peer0' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org2 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel1 org2 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel1 org2 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". + echo "" } " @@ -2341,195 +2341,195 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c "#!/usr/bin/env bash generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" + printHeadline "Generating basic configs" "U1F913" - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Orderer" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org2" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + printItalics "Generating genesis block for group group1" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" } startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + printHeadline "Starting network" "U1F680" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) sleep 4 } generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Generating config for 'my-channel1'" "U1F913" + createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" } installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" - printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" + printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" } installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/chaincode1.json\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/chaincode1.json" else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi } installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/chaincode1.json\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/chaincode1.json" else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi } runDevModeChaincode() { - echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" + echo "Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities" exit 1 } upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/chaincode1.json\\" + printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'" "U1F618" + chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/chaincode1.json" else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi } notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Creating new channel config blocks" "U1F537" + createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel1" "Org2MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + printHeadline "Notyfing orgs about channels" "U1F4E2" + notifyOrgAboutNewChannel "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" + notifyOrgAboutNewChannel "my-channel1" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" + printHeadline "Deleting new channel config blocks" "U1F52A" + deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel1" "Org2MSP" "cli.org2.example.com" } printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" + printHeadline "Done! Enjoy your fresh network" "U1F984" } stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + printHeadline "Stopping network" "U1F68F" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) sleep 4 } networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + printHeadline "Destroying network" "U1F916" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + printf "Removing chaincode containers & images... \\U1F5D1 \\n" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer1.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer1.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer1.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer0.org2.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org2.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org2.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + printf "Removing generated configs... \\U1F5D1 \\n" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" + printHeadline "Done! Network was purged" "U1F5D1" } " `; @@ -2582,8 +2582,8 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" + - "../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json" networks: - basic @@ -2652,8 +2652,8 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" + - "../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json" networks: - basic @@ -2667,7 +2667,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2708,7 +2708,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2781,8 +2781,8 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" + - "../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json" networks: - basic @@ -2842,32 +2842,32 @@ certsGenerate() { local OUTPUT_PATH=$4 local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + echo "Generating certs..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" + inputLog "ORG_PATH: $ORG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -d "$FULL_CERT_PATH" ]; then + echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do + dir=$(dirname "$file") + mv "\${dir}"/*_sk "\${dir}"/priv-key.pem done } @@ -2879,26 +2879,26 @@ genesisBlockCreate() { local GENESIS_PROFILE_NAME=$3 local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + echo "Creating genesis block..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" + inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then + echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + mkdir -p "$OUTPUT_PATH" + docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2910,27 +2910,27 @@ createChannelTx() { local CONFIG_PATH=$2 local CONFIG_PROFILE=$3 local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + echo "Creating channelTx for $CHANNEL_NAME..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$CHANNEL_TX_PATH" ]; then + echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2943,34 +2943,34 @@ createNewChannelUpdateTx() { local CONFIG_PROFILE=$3 local CONFIG_PATH=$4 local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then + echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\ + --configPath ./fabric-config \\ + -profile "\${CONFIG_PROFILE}" \\ + -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ + -channelID "\${CHANNEL_NAME}" \\ + -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2981,24 +2981,24 @@ notifyOrgAboutNewChannel() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -3008,26 +3008,26 @@ notifyOrgAboutNewChannelTls() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + local CA_CERT="/var/hyperledger/cli/"\${6} + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" \\ + --tls --cafile "$CA_CERT" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -3035,58 +3035,58 @@ deleteNewChannelUpdateTx() { local CHANNEL_NAME=$1 local MSP_NAME=$2 local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" + inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' + bold=$'\\e[1m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' + italics=$'\\e[3m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } certsRemove() { local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" + rm -rf "$CERTS_DIR_PATH" } removeContainer() { CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" + docker rm -f "$CONTAINER_NAME" } " `; @@ -3095,46 +3095,46 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c "#!/usr/bin/env bash printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-docker.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-docker.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-docker.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-docker.sh start" + echo -e "\\t Starts already created network." + echo "" + echo "./fabric-docker.sh stop" + echo -e "\\t Stops already running network." + echo "" + echo "./fabric-docker.sh reset" + echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." + echo "" + echo "./fabric-docker.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" } " `; exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` "#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. # see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" + local IMAGE="$1" + if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then + docker pull --platform linux/x86_64 "$IMAGE" fi } @@ -3144,61 +3144,61 @@ chaincodeBuild() { local CHAINCODE_DIR_PATH=$3 local RECOMMENDED_NODE_VERSION=$4 - mkdir -p \\"$CHAINCODE_DIR_PATH\\" + mkdir -p "$CHAINCODE_DIR_PATH" # pull required images upfront in case of arm64 (Apple Silicon) architecture # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + if [ "$(uname -m)" = "arm64" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + if [ "$CHAINCODE_LANG" = "java" ]; then + dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + if [ "$CHAINCODE_LANG" = "golang" ]; then + dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) set +e source ~/.nvm/nvm.sh set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" + if [ "$(command -v nvm)" == "nvm" ]; then + current_dir="$(pwd)" + cd "$CHAINCODE_DIR_PATH" set +u nvm install set -u - cd \\"$current_dir\\" + cd "$current_dir" fi fi - NODE_VERSION=\\"$(node --version)\\" + NODE_VERSION="$(node --version)" - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" + USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" + if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then + RECOMMENDED_NODE_VERSION="8.9" fi - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then + echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" + echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) + if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then + (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) fi fi } @@ -3213,27 +3213,27 @@ chaincodeInstall() { local ORDERER_URL=$7 local CA_CERT=$8 - echo \\"Installing chaincode on $CHANNEL_NAME...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Installing chaincode on $CHANNEL_NAME..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CHANNEL_NAME="$CHANNEL_NAME" "$CLI_NAME" peer chaincode install \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -p "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ + -o "$ORDERER_URL" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeInstantiate() { @@ -3249,40 +3249,40 @@ chaincodeInstantiate() { local CA_CERT=\${10} local COLLECTIONS_CONFIG=\${11} - echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Instantiating chaincode on $CHANNEL_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + inputLog "INIT_PARAMS: $INIT_PARAMS" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode instantiate \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -o "$ORDERER_URL" \\ + -c "$INIT_PARAMS" \\ + -P "$ENDORSEMENT" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeUpgrade() { @@ -3298,41 +3298,41 @@ chaincodeUpgrade() { local CA_CERT=\${10} local COLLECTIONS_CONFIG=\${11} - echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Upgrading chaincode on $CHANNEL_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + inputLog "INIT_PARAMS: $INIT_PARAMS" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode upgrade \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -p /var/hyperledger/cli/"$CHAINCODE_NAME"/ \\ + -o "$ORDERER_URL" \\ + -c "$INIT_PARAMS" \\ + -P "$ENDORSEMENT" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } " `; @@ -3344,11 +3344,11 @@ peerChannelList() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list } peerChannelGetInfo() { @@ -3356,13 +3356,13 @@ peerChannelGetInfo() { local CLI_NAME=$2 local PEER_ADDRESS=$3 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" } peerChannelFetchConfig() { @@ -3371,53 +3371,53 @@ peerChannelFetchConfig() { local CONFIG_FILE_NAME=$3 local PEER_ADDRESS=$4 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local TARGET_FILE="$5" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } #=== TLS equivalents ========================================================= @@ -3427,11 +3427,11 @@ peerChannelListTls() { local PEER_ADDRESS=$2 local CA_CERT=$3 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" } peerChannelGetInfoTls() { @@ -3440,13 +3440,13 @@ peerChannelGetInfoTls() { local PEER_ADDRESS=$3 local CA_CERT=$4 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" } peerChannelFetchConfigTls() { @@ -3456,54 +3456,54 @@ peerChannelFetchConfigTls() { local PEER_ADDRESS=$4 local CA_CERT=$5 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local CA_CERT="$5" + local TARGET_FILE="$6" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" + + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } " `; @@ -3518,26 +3518,26 @@ createChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Creating channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx + peer channel join -b "\${CHANNEL_NAME}".block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } createChannelAndJoinTls() { @@ -3545,9 +3545,9 @@ createChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -3556,24 +3556,24 @@ createChannelAndJoinTls() { local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Creating channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoin() { @@ -3581,24 +3581,24 @@ fetchChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Fetching channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" + peer channel join -b "\${CHANNEL_NAME}"_newest.block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoinTls() { @@ -3606,9 +3606,9 @@ fetchChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -3617,22 +3617,22 @@ fetchChannelAndJoinTls() { local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } " `; @@ -3641,110 +3641,110 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c "#!/usr/bin/env bash __getOrdererAndPeerNodes() { - echo \\" + echo " orderer0.group1.orderer.example.com peer0.org1.example.com peer1.org1.example.com peer0.org2.example.com - \\" + " } __getCASQLiteNodes() { - echo \\" + echo " ca.orderer.example.com ca.org1.example.com ca.org2.example.com - \\" + " } __getCAPostgresNodes() { - echo \\" - \\" + echo " + " } __createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + cd "$FABLO_NETWORK_ROOT/.." + backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then + echo "Error: Directory '$backup_dir' already exists and is not empty!" exit 1 fi - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" + mkdir -p "$backup_dir" + cp -R ./fablo-target "$backup_dir/" for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node" + docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" done for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node/pg-data" + docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" done for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + echo "Saving state of $node..." + docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" done } __cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" + cd "$FABLO_NETWORK_ROOT/.." + target_dir="$1" + hook_cmd="$2" - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + if [ -d "$target_dir/fablo-target" ]; then + echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." exit 1 fi - cp -R ./fablo-target \\"$target_dir/fablo-target\\" + cp -R ./fablo-target "$target_dir/fablo-target" - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + if [ -n "$hook_cmd" ]; then + echo "Executing pre-restore hook: '$hook_cmd'" + (cd "$target_dir" && eval "$hook_cmd") fi - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" fi done for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" fi done for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + docker cp "./$node/" "$node:/var/hyperledger/production/" fi done } createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") + (set -eu && __createSnapshot "$1") } cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") + (set -eu && __cloneSnapshot "$1" "$2") } " `; @@ -3753,12 +3753,12 @@ exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should c "#!/usr/bin/env bash # The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" +echo "Executing post-generate hook" " `; exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper files from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -Array [ +[ "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/.gitignore", "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/collections/chaincode1.json", "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/configtx.yaml", diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index d0bdace2..29b73ff9 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -25,13 +25,13 @@ Channel: &ChannelDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Capabilities: <<: *ChannelCapabilities @@ -47,16 +47,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Writers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Admins: Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" + Rule: "OR('OrdererMSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" AnchorPeers: @@ -68,16 +68,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" + Rule: "OR('Org1MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" AnchorPeers: - Host: peer0.org1.example.com @@ -97,16 +97,16 @@ Application: &ApplicationDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" + Rule: "MAJORITY Endorsement" Capabilities: <<: *ApplicationCapabilities @@ -136,18 +136,18 @@ Orderer: &Group1Defaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" # BlockValidation specifies what signatures must be included in the block # from the orderer for the peer to validate it. BlockValidation: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Capabilities: <<: *OrdererCapabilities @@ -195,53 +195,53 @@ Profiles: exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" + "name": "fablo-test-network-orderer", + "description": "Connection profile for Orderer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer" }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\" + "organizations": { + "Orderer": { + "mspid": "OrdererMSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" + "certificateAuthorities": [ + "ca.orderer.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7042", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"https://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.orderer.example.com": { + "url": "https://localhost:7020", + "caName": "ca.orderer.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -292,53 +292,53 @@ certificateAuthorities: exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Org1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1" }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" + "certificateAuthorities": [ + "ca.org1.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7042", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"https://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.org1.example.com": { + "url": "https://localhost:7040", + "caName": "ca.org1.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -414,13 +414,13 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; @@ -439,14 +439,14 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -454,9 +454,9 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -474,7 +474,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -541,11 +541,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -557,25 +557,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -596,7 +596,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -615,11 +615,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -631,7 +631,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -639,9 +639,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -673,18 +673,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -713,7 +713,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -734,7 +734,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -790,7 +790,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -818,12 +818,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -940,14 +940,14 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -955,9 +955,9 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -975,7 +975,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1042,11 +1042,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1058,25 +1058,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1097,7 +1097,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1116,11 +1116,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1132,7 +1132,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1140,9 +1140,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1174,18 +1174,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1214,7 +1214,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1235,7 +1235,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1291,7 +1291,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1319,12 +1319,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1432,16 +1432,16 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro set -eu -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/.env" +source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" networkUp() { generateArtifacts @@ -1453,45 +1453,45 @@ networkUp() { printStartSuccessInfo } -if [ \\"$1\\" = \\"up\\" ]; then +if [ "$1" = "up" ]; then networkUp -elif [ \\"$1\\" = \\"down\\" ]; then +elif [ "$1" = "down" ]; then networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then +elif [ "$1" = "reset" ]; then networkDown networkUp -elif [ \\"$1\\" = \\"start\\" ]; then +elif [ "$1" = "start" ]; then startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then +elif [ "$1" = "stop" ]; then stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then + chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then +elif [ "$1" = "--help" ]; then printHelp else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" fi " `; @@ -1536,23 +1536,23 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro "#!/usr/bin/env bash chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + elif [ "$1" = "peer0.org1.example.com" ]; then - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + [ "$1" = "peer1.org1.example.com" ] then - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name else - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" exit 1 fi @@ -1565,40 +1565,40 @@ chaincodeList() { # 4. chaincode command # 5. transient data (optional) chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" exit 1 fi - cli=\\"\\" - peer_addresses=\\"\\" + cli="" + peer_addresses="" - peer_certs=\\"\\" + peer_certs="" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + if [[ "$1" == *"peer0.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer0.org1.example.com:7041" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + if [[ "$1" == *"peer1.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer1.org1.example.com:7042" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt" fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" exit 1 fi - if [ \\"$2\\" = \\"my-channel1\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + if [ "$2" = "my-channel1" ]; then + ca_cert="crypto-orderer/tlsca.orderer.example.com-cert.pem" fi - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" + peerChaincodeInvokeTls "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" "\${peer_certs:1}" "$ca_cert" } " @@ -1607,101 +1607,101 @@ chaincodeInvoke() { exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` "#!/usr/bin/env bash -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" set -eu channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" + echo "-> Channel query: " + "$@" - if [ \\"$#\\" -eq 1 ]; then + if [ "$#" -eq 1 ]; then printChannelsHelp - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - peerChannelListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] then - peerChannelListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel1" "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" else - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + echo "$@" + echo "$1, $2, $3, $4, $5, $6, $7, $#" printChannelsHelp fi } printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" + echo "Channel management commands:" + echo "" + + echo "fablo channel list org1 peer0" + echo -e "\\t List channels on 'peer0' of 'Org1'". + echo "" + + echo "fablo channel list org1 peer1" + echo -e "\\t List channels on 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" } " @@ -1711,172 +1711,172 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro "#!/usr/bin/env bash generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" + printHeadline "Generating basic configs" "U1F913" - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Orderer" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + printItalics "Generating genesis block for group group1" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" } startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + printHeadline "Starting network" "U1F680" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) sleep 4 } generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Generating config for 'my-channel1'" "U1F913" + createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" } installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" - printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" } installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi } installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi } runDevModeChaincode() { - echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" + echo "Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities" exit 1 } upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printItalics "Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'" "U1F618" + chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi } notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Creating new channel config blocks" "U1F537" + createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline "Notyfing orgs about channels" "U1F4E2" + notifyOrgAboutNewChannelTls "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" + printHeadline "Deleting new channel config blocks" "U1F52A" + deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" } printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" + printHeadline "Done! Enjoy your fresh network" "U1F984" } stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + printHeadline "Stopping network" "U1F68F" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) sleep 4 } networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + printHeadline "Destroying network" "U1F916" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + printf "Removing chaincode containers & images... \\U1F5D1 \\n" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer1.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer1.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer1.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + printf "Removing generated configs... \\U1F5D1 \\n" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" + printHeadline "Done! Network was purged" "U1F5D1" } " `; @@ -1939,7 +1939,7 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -2029,7 +2029,7 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -2043,7 +2043,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2089,7 +2089,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2140,32 +2140,32 @@ certsGenerate() { local OUTPUT_PATH=$4 local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + echo "Generating certs..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" + inputLog "ORG_PATH: $ORG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -d "$FULL_CERT_PATH" ]; then + echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do + dir=$(dirname "$file") + mv "\${dir}"/*_sk "\${dir}"/priv-key.pem done } @@ -2177,26 +2177,26 @@ genesisBlockCreate() { local GENESIS_PROFILE_NAME=$3 local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + echo "Creating genesis block..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" + inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then + echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + mkdir -p "$OUTPUT_PATH" + docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2208,27 +2208,27 @@ createChannelTx() { local CONFIG_PATH=$2 local CONFIG_PROFILE=$3 local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + echo "Creating channelTx for $CHANNEL_NAME..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$CHANNEL_TX_PATH" ]; then + echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2241,34 +2241,34 @@ createNewChannelUpdateTx() { local CONFIG_PROFILE=$3 local CONFIG_PATH=$4 local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then + echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\ + --configPath ./fabric-config \\ + -profile "\${CONFIG_PROFILE}" \\ + -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ + -channelID "\${CHANNEL_NAME}" \\ + -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2279,24 +2279,24 @@ notifyOrgAboutNewChannel() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -2306,26 +2306,26 @@ notifyOrgAboutNewChannelTls() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + local CA_CERT="/var/hyperledger/cli/"\${6} + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" \\ + --tls --cafile "$CA_CERT" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -2333,58 +2333,58 @@ deleteNewChannelUpdateTx() { local CHANNEL_NAME=$1 local MSP_NAME=$2 local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" + inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' + bold=$'\\e[1m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' + italics=$'\\e[3m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } certsRemove() { local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" + rm -rf "$CERTS_DIR_PATH" } removeContainer() { CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" + docker rm -f "$CONTAINER_NAME" } " `; @@ -2393,46 +2393,46 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro "#!/usr/bin/env bash printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-docker.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-docker.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-docker.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-docker.sh start" + echo -e "\\t Starts already created network." + echo "" + echo "./fabric-docker.sh stop" + echo -e "\\t Stops already running network." + echo "" + echo "./fabric-docker.sh reset" + echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." + echo "" + echo "./fabric-docker.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" } " `; exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` "#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. # see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" + local IMAGE="$1" + if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then + docker pull --platform linux/x86_64 "$IMAGE" fi } @@ -2442,61 +2442,61 @@ chaincodeBuild() { local CHAINCODE_DIR_PATH=$3 local RECOMMENDED_NODE_VERSION=$4 - mkdir -p \\"$CHAINCODE_DIR_PATH\\" + mkdir -p "$CHAINCODE_DIR_PATH" # pull required images upfront in case of arm64 (Apple Silicon) architecture # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + if [ "$(uname -m)" = "arm64" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + if [ "$CHAINCODE_LANG" = "java" ]; then + dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + if [ "$CHAINCODE_LANG" = "golang" ]; then + dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) set +e source ~/.nvm/nvm.sh set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" + if [ "$(command -v nvm)" == "nvm" ]; then + current_dir="$(pwd)" + cd "$CHAINCODE_DIR_PATH" set +u nvm install set -u - cd \\"$current_dir\\" + cd "$current_dir" fi fi - NODE_VERSION=\\"$(node --version)\\" + NODE_VERSION="$(node --version)" - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" + USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" + if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then + RECOMMENDED_NODE_VERSION="8.9" fi - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then + echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" + echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) + if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then + (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) fi fi } @@ -2511,27 +2511,27 @@ chaincodeInstall() { local ORDERER_URL=$7 local CA_CERT=$8 - echo \\"Installing chaincode on $CHANNEL_NAME...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Installing chaincode on $CHANNEL_NAME..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CHANNEL_NAME="$CHANNEL_NAME" "$CLI_NAME" peer chaincode install \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -p "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ + -o "$ORDERER_URL" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeInstantiate() { @@ -2547,40 +2547,40 @@ chaincodeInstantiate() { local CA_CERT=\${10} local COLLECTIONS_CONFIG=\${11} - echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Instantiating chaincode on $CHANNEL_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + inputLog "INIT_PARAMS: $INIT_PARAMS" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode instantiate \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -o "$ORDERER_URL" \\ + -c "$INIT_PARAMS" \\ + -P "$ENDORSEMENT" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeUpgrade() { @@ -2596,41 +2596,41 @@ chaincodeUpgrade() { local CA_CERT=\${10} local COLLECTIONS_CONFIG=\${11} - echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Upgrading chaincode on $CHANNEL_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + inputLog "INIT_PARAMS: $INIT_PARAMS" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode upgrade \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -p /var/hyperledger/cli/"$CHAINCODE_NAME"/ \\ + -o "$ORDERER_URL" \\ + -c "$INIT_PARAMS" \\ + -P "$ENDORSEMENT" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } " `; @@ -2642,11 +2642,11 @@ peerChannelList() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list } peerChannelGetInfo() { @@ -2654,13 +2654,13 @@ peerChannelGetInfo() { local CLI_NAME=$2 local PEER_ADDRESS=$3 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" } peerChannelFetchConfig() { @@ -2669,53 +2669,53 @@ peerChannelFetchConfig() { local CONFIG_FILE_NAME=$3 local PEER_ADDRESS=$4 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local TARGET_FILE="$5" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } #=== TLS equivalents ========================================================= @@ -2725,11 +2725,11 @@ peerChannelListTls() { local PEER_ADDRESS=$2 local CA_CERT=$3 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" } peerChannelGetInfoTls() { @@ -2738,13 +2738,13 @@ peerChannelGetInfoTls() { local PEER_ADDRESS=$3 local CA_CERT=$4 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" } peerChannelFetchConfigTls() { @@ -2754,54 +2754,54 @@ peerChannelFetchConfigTls() { local PEER_ADDRESS=$4 local CA_CERT=$5 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local CA_CERT="$5" + local TARGET_FILE="$6" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" + + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } " `; @@ -2816,26 +2816,26 @@ createChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Creating channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx + peer channel join -b "\${CHANNEL_NAME}".block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } createChannelAndJoinTls() { @@ -2843,9 +2843,9 @@ createChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -2854,24 +2854,24 @@ createChannelAndJoinTls() { local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Creating channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoin() { @@ -2879,24 +2879,24 @@ fetchChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Fetching channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" + peer channel join -b "\${CHANNEL_NAME}"_newest.block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoinTls() { @@ -2904,9 +2904,9 @@ fetchChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -2915,22 +2915,22 @@ fetchChannelAndJoinTls() { local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } " `; @@ -2939,108 +2939,108 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro "#!/usr/bin/env bash __getOrdererAndPeerNodes() { - echo \\" + echo " orderer0.group1.orderer.example.com peer0.org1.example.com peer1.org1.example.com - \\" + " } __getCASQLiteNodes() { - echo \\" + echo " ca.orderer.example.com ca.org1.example.com - \\" + " } __getCAPostgresNodes() { - echo \\" - \\" + echo " + " } __createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + cd "$FABLO_NETWORK_ROOT/.." + backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then + echo "Error: Directory '$backup_dir' already exists and is not empty!" exit 1 fi - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" + mkdir -p "$backup_dir" + cp -R ./fablo-target "$backup_dir/" for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node" + docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" done for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node/pg-data" + docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" done for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + echo "Saving state of $node..." + docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" done } __cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" + cd "$FABLO_NETWORK_ROOT/.." + target_dir="$1" + hook_cmd="$2" - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + if [ -d "$target_dir/fablo-target" ]; then + echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." exit 1 fi - cp -R ./fablo-target \\"$target_dir/fablo-target\\" + cp -R ./fablo-target "$target_dir/fablo-target" - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + if [ -n "$hook_cmd" ]; then + echo "Executing pre-restore hook: '$hook_cmd'" + (cd "$target_dir" && eval "$hook_cmd") fi - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" fi done for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" fi done for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + docker cp "./$node/" "$node:/var/hyperledger/production/" fi done } createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") + (set -eu && __createSnapshot "$1") } cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") + (set -eu && __cloneSnapshot "$1" "$2") } " `; @@ -3049,12 +3049,12 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro "#!/usr/bin/env bash # The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" +echo "Executing post-generate hook" " `; exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper files from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -Array [ +[ "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/.gitignore", "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml", "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index 50e36bbc..2c5898bd 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -25,13 +25,13 @@ Channel: &ChannelDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Capabilities: <<: *ChannelCapabilities @@ -47,16 +47,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Writers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Admins: Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" + Rule: "OR('OrdererMSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" AnchorPeers: @@ -68,16 +68,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" + Rule: "OR('Org1MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" AnchorPeers: - Host: peer0.org1.example.com @@ -94,16 +94,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org2MSP.admin')\\" + Rule: "OR('Org2MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" AnchorPeers: - Host: peer0.org2.example.com @@ -123,16 +123,16 @@ Application: &ApplicationDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" + Rule: "MAJORITY Endorsement" Capabilities: <<: *ApplicationCapabilities @@ -155,18 +155,18 @@ Orderer: &Group1Defaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" # BlockValidation specifies what signatures must be included in the block # from the orderer for the peer to validate it. BlockValidation: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Capabilities: <<: *OrdererCapabilities @@ -238,46 +238,46 @@ Profiles: exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" + "name": "fablo-test-network-orderer", + "description": "Connection profile for Orderer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer" }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "organizations": { + "Orderer": { + "mspid": "OrdererMSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" + "certificateAuthorities": [ + "ca.orderer.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7062\\" + "peer1.org2.example.com": { + "url": "grpc://localhost:7062" } }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.orderer.example.com": { + "url": "http://localhost:7020", + "caName": "ca.orderer.example.com", + "httpOptions": { + "verify": false } } } @@ -321,46 +321,46 @@ certificateAuthorities: exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Org1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1" }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" + "certificateAuthorities": [ + "ca.org1.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7062\\" + "peer1.org2.example.com": { + "url": "grpc://localhost:7062" } }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.org1.example.com": { + "url": "http://localhost:7040", + "caName": "ca.org1.example.com", + "httpOptions": { + "verify": false } } } @@ -404,46 +404,46 @@ certificateAuthorities: exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Org2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\" + "name": "fablo-test-network-org2", + "description": "Connection profile for Org2 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org2" }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "organizations": { + "Org2": { + "mspid": "Org2MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org2.example.com\\" + "certificateAuthorities": [ + "ca.org2.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7062\\" + "peer1.org2.example.com": { + "url": "grpc://localhost:7062" } }, - \\"certificateAuthorities\\": { - \\"ca.org2.example.com\\": { - \\"url\\": \\"http://localhost:7060\\", - \\"caName\\": \\"ca.org2.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.org2.example.com": { + "url": "http://localhost:7060", + "caName": "ca.org2.example.com", + "httpOptions": { + "verify": false } } } @@ -524,17 +524,17 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" }, - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + "network-org2": { + "name": "Network of Org2", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; @@ -553,14 +553,14 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -568,9 +568,9 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -588,7 +588,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -655,11 +655,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -671,25 +671,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -710,7 +710,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -729,11 +729,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -745,7 +745,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -753,9 +753,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -787,18 +787,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -827,7 +827,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -848,7 +848,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -904,7 +904,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -932,12 +932,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1054,14 +1054,14 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1069,9 +1069,9 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1089,7 +1089,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1156,11 +1156,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1172,25 +1172,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1211,7 +1211,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1230,11 +1230,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1246,7 +1246,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1254,9 +1254,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1288,18 +1288,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1328,7 +1328,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1349,7 +1349,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1405,7 +1405,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1433,12 +1433,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1555,14 +1555,14 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1570,9 +1570,9 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1590,7 +1590,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1657,11 +1657,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1673,25 +1673,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1712,7 +1712,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1731,11 +1731,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1747,7 +1747,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1755,9 +1755,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1789,18 +1789,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1829,7 +1829,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1850,7 +1850,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1906,7 +1906,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1934,12 +1934,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -2047,16 +2047,16 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper set -eu -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/.env" +source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" networkUp() { generateArtifacts @@ -2068,45 +2068,45 @@ networkUp() { printStartSuccessInfo } -if [ \\"$1\\" = \\"up\\" ]; then +if [ "$1" = "up" ]; then networkUp -elif [ \\"$1\\" = \\"down\\" ]; then +elif [ "$1" = "down" ]; then networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then +elif [ "$1" = "reset" ]; then networkDown networkUp -elif [ \\"$1\\" = \\"start\\" ]; then +elif [ "$1" = "start" ]; then startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then +elif [ "$1" = "stop" ]; then stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then + chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then +elif [ "$1" = "--help" ]; then printHelp else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" fi " `; @@ -2154,35 +2154,35 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper "#!/usr/bin/env bash chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + elif [ "$1" = "peer0.org1.example.com" ]; then - peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" # $2 is channel name elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + [ "$1" = "peer1.org1.example.com" ] then - peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" # $2 is channel name elif - [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + [ "$1" = "peer0.org2.example.com" ] then - peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org2.example.com" "peer0.org2.example.com:7061" "$2" # $2 is channel name elif - [ \\"$1\\" = \\"peer1.org2.example.com\\" ] + [ "$1" = "peer1.org2.example.com" ] then - peerChaincodeList \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org2.example.com" "peer1.org2.example.com:7062" "$2" # $2 is channel name else - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" exit 1 fi @@ -2195,40 +2195,40 @@ chaincodeList() { # 4. chaincode command # 5. transient data (optional) chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" exit 1 fi - cli=\\"\\" - peer_addresses=\\"\\" + cli="" + peer_addresses="" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + if [[ "$1" == *"peer0.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer0.org1.example.com:7041" fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + if [[ "$1" == *"peer1.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer1.org1.example.com:7042" fi - if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + if [[ "$1" == *"peer0.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer0.org2.example.com:7061" fi - if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" + if [[ "$1" == *"peer1.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer1.org2.example.com:7062" fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" exit 1 fi - peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + peerChaincodeInvoke "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" } " @@ -2237,175 +2237,175 @@ chaincodeInvoke() { exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` "#!/usr/bin/env bash -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" set -eu channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" + echo "-> Channel query: " + "$@" - if [ \\"$#\\" -eq 1 ]; then + if [ "$#" -eq 1 ]; then printChannelsHelp - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - peerChannelList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + peerChannelList "cli.org1.example.com" "peer0.org1.example.com:7041" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] then - peerChannelList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + peerChannelList "cli.org1.example.com" "peer1.org1.example.com:7042" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] then - peerChannelList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + peerChannelList "cli.org2.example.com" "peer0.org2.example.com:7061" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer1" ] then - peerChannelList \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" + peerChannelList "cli.org2.example.com" "peer1.org2.example.com:7062" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" + peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] then - peerChannelGetInfo \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + peerChannelGetInfo "my-channel1" "cli.org2.example.com" "peer0.org2.example.com:7061" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" + peerChannelFetchConfig "my-channel1" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel1" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] then - peerChannelGetInfo \\"my-channel2\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + peerChannelGetInfo "my-channel2" "cli.org1.example.com" "peer1.org1.example.com:7042" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel2\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" + peerChannelFetchConfig "my-channel2" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel2\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel2" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org2" ] && [ "$4" = "peer1" ] then - peerChannelGetInfo \\"my-channel2\\" \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" + peerChannelGetInfo "my-channel2" "cli.org2.example.com" "peer1.org2.example.com:7062" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel2\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org2.example.com:7062\\" + peerChannelFetchConfig "my-channel2" "cli.org2.example.com" "$TARGET_FILE" "peer1.org2.example.com:7062" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel2\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org2.example.com:7062\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel2" "cli.org2.example.com" "\${BLOCK_NAME}" "peer1.org2.example.com:7062" "$TARGET_FILE" else - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + echo "$@" + echo "$1, $2, $3, $4, $5, $6, $7, $#" printChannelsHelp fi } printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org2 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org2 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org2 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" + echo "Channel management commands:" + echo "" + + echo "fablo channel list org1 peer0" + echo -e "\\t List channels on 'peer0' of 'Org1'". + echo "" + + echo "fablo channel list org1 peer1" + echo -e "\\t List channels on 'peer1' of 'Org1'". + echo "" + + echo "fablo channel list org2 peer0" + echo -e "\\t List channels on 'peer0' of 'Org2'". + echo "" + + echo "fablo channel list org2 peer1" + echo -e "\\t List channels on 'peer1' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org2 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel1 org2 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel1 org2 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel2 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel2 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel2 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel2 org2 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel2 org2 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel2 org2 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'". + echo "" } " @@ -2415,191 +2415,191 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper "#!/usr/bin/env bash generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" + printHeadline "Generating basic configs" "U1F913" - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Orderer" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org2" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + printItalics "Generating genesis block for group group1" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" } startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + printHeadline "Starting network" "U1F680" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) sleep 4 } generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - printHeadline \\"Generating config for 'my-channel2'\\" \\"U1F913\\" - createChannelTx \\"my-channel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Generating config for 'my-channel1'" "U1F913" + createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" + printHeadline "Generating config for 'my-channel2'" "U1F913" + createChannelTx "my-channel2" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config/config" } installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" - printHeadline \\"Creating 'my-channel2' on Org1/peer1\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" + printHeadline "Creating 'my-channel2' on Org1/peer1" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoin 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - printItalics \\"Joining 'my-channel2' on Org2/peer1\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printItalics "Joining 'my-channel2' on Org2/peer1" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" } installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member', 'Org2MSP.member')" "" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi } installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member', 'Org2MSP.member')" "" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi } runDevModeChaincode() { - echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" + echo "Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities" exit 1 } upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"\\" + printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'" "U1F618" + chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member', 'Org2MSP.member')" "" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi } notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - notifyOrgAboutNewChannel \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - notifyOrgAboutNewChannel \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" + printHeadline "Creating new channel config blocks" "U1F537" + createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel1" "Org2MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel2" "Org1MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel2" "Org2MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + + printHeadline "Notyfing orgs about channels" "U1F4E2" + notifyOrgAboutNewChannel "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" + notifyOrgAboutNewChannel "my-channel1" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" + notifyOrgAboutNewChannel "my-channel2" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" + notifyOrgAboutNewChannel "my-channel2" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" + + printHeadline "Deleting new channel config blocks" "U1F52A" + deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel1" "Org2MSP" "cli.org2.example.com" + deleteNewChannelUpdateTx "my-channel2" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel2" "Org2MSP" "cli.org2.example.com" } printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" + printHeadline "Done! Enjoy your fresh network" "U1F984" } stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + printHeadline "Stopping network" "U1F68F" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) sleep 4 } networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + printHeadline "Destroying network" "U1F916" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + printf "Removing chaincode containers & images... \\U1F5D1 \\n" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer0.org2.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org2.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org2.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + printf "Removing generated configs... \\U1F5D1 \\n" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" + printHeadline "Done! Network was purged" "U1F5D1" } " `; @@ -2652,7 +2652,7 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -2721,7 +2721,7 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -2735,7 +2735,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2776,7 +2776,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2849,7 +2849,7 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -2863,7 +2863,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7061 peer1.org2.example.com:7062" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2904,7 +2904,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org2.example.com:7062 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org2.example.com:7062 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7061 peer1.org2.example.com:7062" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2950,32 +2950,32 @@ certsGenerate() { local OUTPUT_PATH=$4 local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + echo "Generating certs..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" + inputLog "ORG_PATH: $ORG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -d "$FULL_CERT_PATH" ]; then + echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do + dir=$(dirname "$file") + mv "\${dir}"/*_sk "\${dir}"/priv-key.pem done } @@ -2987,26 +2987,26 @@ genesisBlockCreate() { local GENESIS_PROFILE_NAME=$3 local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + echo "Creating genesis block..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" + inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then + echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + mkdir -p "$OUTPUT_PATH" + docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -3018,27 +3018,27 @@ createChannelTx() { local CONFIG_PATH=$2 local CONFIG_PROFILE=$3 local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + echo "Creating channelTx for $CHANNEL_NAME..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$CHANNEL_TX_PATH" ]; then + echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -3051,34 +3051,34 @@ createNewChannelUpdateTx() { local CONFIG_PROFILE=$3 local CONFIG_PATH=$4 local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then + echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\ + --configPath ./fabric-config \\ + -profile "\${CONFIG_PROFILE}" \\ + -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ + -channelID "\${CHANNEL_NAME}" \\ + -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -3089,24 +3089,24 @@ notifyOrgAboutNewChannel() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -3116,26 +3116,26 @@ notifyOrgAboutNewChannelTls() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + local CA_CERT="/var/hyperledger/cli/"\${6} + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" \\ + --tls --cafile "$CA_CERT" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -3143,58 +3143,58 @@ deleteNewChannelUpdateTx() { local CHANNEL_NAME=$1 local MSP_NAME=$2 local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" + inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' + bold=$'\\e[1m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' + italics=$'\\e[3m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } certsRemove() { local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" + rm -rf "$CERTS_DIR_PATH" } removeContainer() { CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" + docker rm -f "$CONTAINER_NAME" } " `; @@ -3203,46 +3203,46 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper "#!/usr/bin/env bash printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-docker.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-docker.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-docker.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-docker.sh start" + echo -e "\\t Starts already created network." + echo "" + echo "./fabric-docker.sh stop" + echo -e "\\t Stops already running network." + echo "" + echo "./fabric-docker.sh reset" + echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." + echo "" + echo "./fabric-docker.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" } " `; exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` "#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. # see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" + local IMAGE="$1" + if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then + docker pull --platform linux/x86_64 "$IMAGE" fi } @@ -3252,61 +3252,61 @@ chaincodeBuild() { local CHAINCODE_DIR_PATH=$3 local RECOMMENDED_NODE_VERSION=$4 - mkdir -p \\"$CHAINCODE_DIR_PATH\\" + mkdir -p "$CHAINCODE_DIR_PATH" # pull required images upfront in case of arm64 (Apple Silicon) architecture # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + if [ "$(uname -m)" = "arm64" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + if [ "$CHAINCODE_LANG" = "java" ]; then + dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + if [ "$CHAINCODE_LANG" = "golang" ]; then + dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) set +e source ~/.nvm/nvm.sh set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" + if [ "$(command -v nvm)" == "nvm" ]; then + current_dir="$(pwd)" + cd "$CHAINCODE_DIR_PATH" set +u nvm install set -u - cd \\"$current_dir\\" + cd "$current_dir" fi fi - NODE_VERSION=\\"$(node --version)\\" + NODE_VERSION="$(node --version)" - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" + USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" + if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then + RECOMMENDED_NODE_VERSION="8.9" fi - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then + echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" + echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) + if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then + (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) fi fi } @@ -3321,27 +3321,27 @@ chaincodeInstall() { local ORDERER_URL=$7 local CA_CERT=$8 - echo \\"Installing chaincode on $CHANNEL_NAME...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Installing chaincode on $CHANNEL_NAME..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CHANNEL_NAME="$CHANNEL_NAME" "$CLI_NAME" peer chaincode install \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -p "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ + -o "$ORDERER_URL" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeInstantiate() { @@ -3357,40 +3357,40 @@ chaincodeInstantiate() { local CA_CERT=\${10} local COLLECTIONS_CONFIG=\${11} - echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Instantiating chaincode on $CHANNEL_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + inputLog "INIT_PARAMS: $INIT_PARAMS" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode instantiate \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -o "$ORDERER_URL" \\ + -c "$INIT_PARAMS" \\ + -P "$ENDORSEMENT" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeUpgrade() { @@ -3406,41 +3406,41 @@ chaincodeUpgrade() { local CA_CERT=\${10} local COLLECTIONS_CONFIG=\${11} - echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Upgrading chaincode on $CHANNEL_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + inputLog "INIT_PARAMS: $INIT_PARAMS" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode upgrade \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -p /var/hyperledger/cli/"$CHAINCODE_NAME"/ \\ + -o "$ORDERER_URL" \\ + -c "$INIT_PARAMS" \\ + -P "$ENDORSEMENT" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } " `; @@ -3452,11 +3452,11 @@ peerChannelList() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list } peerChannelGetInfo() { @@ -3464,13 +3464,13 @@ peerChannelGetInfo() { local CLI_NAME=$2 local PEER_ADDRESS=$3 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" } peerChannelFetchConfig() { @@ -3479,53 +3479,53 @@ peerChannelFetchConfig() { local CONFIG_FILE_NAME=$3 local PEER_ADDRESS=$4 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local TARGET_FILE="$5" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } #=== TLS equivalents ========================================================= @@ -3535,11 +3535,11 @@ peerChannelListTls() { local PEER_ADDRESS=$2 local CA_CERT=$3 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" } peerChannelGetInfoTls() { @@ -3548,13 +3548,13 @@ peerChannelGetInfoTls() { local PEER_ADDRESS=$3 local CA_CERT=$4 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" } peerChannelFetchConfigTls() { @@ -3564,54 +3564,54 @@ peerChannelFetchConfigTls() { local PEER_ADDRESS=$4 local CA_CERT=$5 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local CA_CERT="$5" + local TARGET_FILE="$6" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" + + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } " `; @@ -3626,26 +3626,26 @@ createChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Creating channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx + peer channel join -b "\${CHANNEL_NAME}".block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } createChannelAndJoinTls() { @@ -3653,9 +3653,9 @@ createChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -3664,24 +3664,24 @@ createChannelAndJoinTls() { local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Creating channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoin() { @@ -3689,24 +3689,24 @@ fetchChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Fetching channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" + peer channel join -b "\${CHANNEL_NAME}"_newest.block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoinTls() { @@ -3714,9 +3714,9 @@ fetchChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -3725,22 +3725,22 @@ fetchChannelAndJoinTls() { local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } " `; @@ -3749,111 +3749,111 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper "#!/usr/bin/env bash __getOrdererAndPeerNodes() { - echo \\" + echo " orderer0.group1.orderer.example.com peer0.org1.example.com peer1.org1.example.com peer0.org2.example.com peer1.org2.example.com - \\" + " } __getCASQLiteNodes() { - echo \\" + echo " ca.orderer.example.com ca.org1.example.com ca.org2.example.com - \\" + " } __getCAPostgresNodes() { - echo \\" - \\" + echo " + " } __createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + cd "$FABLO_NETWORK_ROOT/.." + backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then + echo "Error: Directory '$backup_dir' already exists and is not empty!" exit 1 fi - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" + mkdir -p "$backup_dir" + cp -R ./fablo-target "$backup_dir/" for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node" + docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" done for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node/pg-data" + docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" done for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + echo "Saving state of $node..." + docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" done } __cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" + cd "$FABLO_NETWORK_ROOT/.." + target_dir="$1" + hook_cmd="$2" - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + if [ -d "$target_dir/fablo-target" ]; then + echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." exit 1 fi - cp -R ./fablo-target \\"$target_dir/fablo-target\\" + cp -R ./fablo-target "$target_dir/fablo-target" - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + if [ -n "$hook_cmd" ]; then + echo "Executing pre-restore hook: '$hook_cmd'" + (cd "$target_dir" && eval "$hook_cmd") fi - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" fi done for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" fi done for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + docker cp "./$node/" "$node:/var/hyperledger/production/" fi done } createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") + (set -eu && __createSnapshot "$1") } cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") + (set -eu && __cloneSnapshot "$1" "$2") } " `; @@ -3862,12 +3862,12 @@ exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper "#!/usr/bin/env bash # The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" +echo "Executing post-generate hook" " `; exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper files from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -Array [ +[ "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore", "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/configtx.yaml", "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index 7fc20cd9..8f16750c 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -9,12 +9,12 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/and-policy-chaincode.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` "[ { - \\"name\\": \\"org1-collection\\", - \\"policy\\": \\"OR('Org1MSP.member')\\", - \\"requiredPeerCount\\": 1, - \\"maxPeerCount\\": 3, - \\"blockToLive\\": 0, - \\"memberOnlyRead\\": true + "name": "org1-collection", + "policy": "OR('Org1MSP.member')", + "requiredPeerCount": 1, + "maxPeerCount": 3, + "blockToLive": 0, + "memberOnlyRead": true } ]" `; @@ -22,12 +22,12 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/or-policy-chaincode.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` "[ { - \\"name\\": \\"org1-collection\\", - \\"policy\\": \\"OR('Org1MSP.member')\\", - \\"requiredPeerCount\\": 1, - \\"maxPeerCount\\": 3, - \\"blockToLive\\": 0, - \\"memberOnlyRead\\": true + "name": "org1-collection", + "policy": "OR('Org1MSP.member')", + "requiredPeerCount": 1, + "maxPeerCount": 3, + "blockToLive": 0, + "memberOnlyRead": true } ]" `; @@ -51,13 +51,13 @@ Channel: &ChannelDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Capabilities: <<: *ChannelCapabilities @@ -73,16 +73,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Writers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Admins: Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" + Rule: "OR('OrdererMSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" AnchorPeers: @@ -94,16 +94,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" + Rule: "OR('Org1MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" AnchorPeers: - Host: peer0.org1.example.com @@ -120,16 +120,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org2MSP.admin')\\" + Rule: "OR('Org2MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" AnchorPeers: - Host: peer0.org2.example.com @@ -146,16 +146,16 @@ Application: &ApplicationDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" + Rule: "MAJORITY Endorsement" Capabilities: <<: *ApplicationCapabilities @@ -178,18 +178,18 @@ Orderer: &Group1Defaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" # BlockValidation specifies what signatures must be included in the block # from the orderer for the peer to validate it. BlockValidation: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Capabilities: <<: *OrdererCapabilities @@ -240,42 +240,42 @@ Profiles: exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` "{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" + "name": "fablo-test-network-orderer", + "description": "Connection profile for Orderer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer" }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" + "organizations": { + "Orderer": { + "mspid": "OrdererMSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" + "certificateAuthorities": [ + "ca.orderer.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" } }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.orderer.example.com": { + "url": "http://localhost:7020", + "caName": "ca.orderer.example.com", + "httpOptions": { + "verify": false } } } @@ -316,42 +316,42 @@ certificateAuthorities: exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Org1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1" }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" + "certificateAuthorities": [ + "ca.org1.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" } }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.org1.example.com": { + "url": "http://localhost:7040", + "caName": "ca.org1.example.com", + "httpOptions": { + "verify": false } } } @@ -392,42 +392,42 @@ certificateAuthorities: exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Org2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\" + "name": "fablo-test-network-org2", + "description": "Connection profile for Org2 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org2" }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" + "organizations": { + "Org2": { + "mspid": "Org2MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org2.example.com\\" + "certificateAuthorities": [ + "ca.org2.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" } }, - \\"certificateAuthorities\\": { - \\"ca.org2.example.com\\": { - \\"url\\": \\"http://localhost:7060\\", - \\"caName\\": \\"ca.org2.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.org2.example.com": { + "url": "http://localhost:7060", + "caName": "ca.org2.example.com", + "httpOptions": { + "verify": false } } } @@ -505,17 +505,17 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" }, - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + "network-org2": { + "name": "Network of Org2", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; @@ -534,14 +534,14 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -549,9 +549,9 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -569,7 +569,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -636,11 +636,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -652,25 +652,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -691,7 +691,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -710,11 +710,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -726,7 +726,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -734,9 +734,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -768,18 +768,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -808,7 +808,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -829,7 +829,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -885,7 +885,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -913,12 +913,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1035,14 +1035,14 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1050,9 +1050,9 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1070,7 +1070,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1137,11 +1137,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1153,25 +1153,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1192,7 +1192,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1211,11 +1211,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1227,7 +1227,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1235,9 +1235,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1269,18 +1269,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1309,7 +1309,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1330,7 +1330,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1386,7 +1386,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1414,12 +1414,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1536,14 +1536,14 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1551,9 +1551,9 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1571,7 +1571,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1638,11 +1638,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1654,25 +1654,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1693,7 +1693,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1712,11 +1712,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1728,7 +1728,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1736,9 +1736,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1770,18 +1770,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1810,7 +1810,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1831,7 +1831,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1887,7 +1887,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1915,12 +1915,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -2028,16 +2028,16 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should set -eu -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/.env" +source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" networkUp() { generateArtifacts @@ -2049,45 +2049,45 @@ networkUp() { printStartSuccessInfo } -if [ \\"$1\\" = \\"up\\" ]; then +if [ "$1" = "up" ]; then networkUp -elif [ \\"$1\\" = \\"down\\" ]; then +elif [ "$1" = "down" ]; then networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then +elif [ "$1" = "reset" ]; then networkDown networkUp -elif [ \\"$1\\" = \\"start\\" ]; then +elif [ "$1" = "start" ]; then startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then +elif [ "$1" = "stop" ]; then stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then + chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then +elif [ "$1" = "--help" ]; then printHelp else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" fi " `; @@ -2135,29 +2135,29 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should "#!/usr/bin/env bash chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + elif [ "$1" = "peer0.org1.example.com" ]; then - peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" # $2 is channel name elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + [ "$1" = "peer1.org1.example.com" ] then - peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" # $2 is channel name elif - [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + [ "$1" = "peer0.org2.example.com" ] then - peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org2.example.com" "peer0.org2.example.com:7061" "$2" # $2 is channel name else - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" exit 1 fi @@ -2170,35 +2170,35 @@ chaincodeList() { # 4. chaincode command # 5. transient data (optional) chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" exit 1 fi - cli=\\"\\" - peer_addresses=\\"\\" + cli="" + peer_addresses="" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + if [[ "$1" == *"peer0.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer0.org1.example.com:7041" fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + if [[ "$1" == *"peer1.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer1.org1.example.com:7042" fi - if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + if [[ "$1" == *"peer0.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer0.org2.example.com:7061" fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" exit 1 fi - peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + peerChaincodeInvoke "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" } " @@ -2207,138 +2207,138 @@ chaincodeInvoke() { exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` "#!/usr/bin/env bash -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" set -eu channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" + echo "-> Channel query: " + "$@" - if [ \\"$#\\" -eq 1 ]; then + if [ "$#" -eq 1 ]; then printChannelsHelp - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - peerChannelList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + peerChannelList "cli.org1.example.com" "peer0.org1.example.com:7041" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] then - peerChannelList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + peerChannelList "cli.org1.example.com" "peer1.org1.example.com:7042" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] then - peerChannelList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + peerChannelList "cli.org2.example.com" "peer0.org2.example.com:7061" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" + peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] then - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer1.org1.example.com:7042" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" + peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] then - peerChannelGetInfo \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + peerChannelGetInfo "my-channel1" "cli.org2.example.com" "peer0.org2.example.com:7061" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" + peerChannelFetchConfig "my-channel1" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel1" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "$TARGET_FILE" else - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + echo "$@" + echo "$1, $2, $3, $4, $5, $6, $7, $#" printChannelsHelp fi } printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" + echo "Channel management commands:" + echo "" + + echo "fablo channel list org1 peer0" + echo -e "\\t List channels on 'peer0' of 'Org1'". + echo "" + + echo "fablo channel list org1 peer1" + echo -e "\\t List channels on 'peer1' of 'Org1'". + echo "" + + echo "fablo channel list org2 peer0" + echo -e "\\t List channels on 'peer0' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org2 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel1 org2 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel1 org2 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". + echo "" } " @@ -2348,270 +2348,270 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should "#!/usr/bin/env bash generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" + printHeadline "Generating basic configs" "U1F913" - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Orderer" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org2" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + printItalics "Generating genesis block for group group1" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" } startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + printHeadline "Starting network" "U1F680" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) sleep 4 } generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Generating config for 'my-channel1'" "U1F913" + createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" } installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" - printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" + printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" } installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"or-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/or-policy-chaincode.json\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "or-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Instantiating chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/or-policy-chaincode.json" else - echo \\"Warning! Skipping chaincode 'or-policy-chaincode' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'or-policy-chaincode' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"and-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/and-policy-chaincode.json\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "and-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Instantiating chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND('Org1MSP.member', 'Org2MSP.member')" "" "collections/and-policy-chaincode.json" else - echo \\"Warning! Skipping chaincode 'and-policy-chaincode' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'and-policy-chaincode' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi } installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"or-policy-chaincode\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"or-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/or-policy-chaincode.json\\" + if [ "$chaincodeName" = "or-policy-chaincode" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "or-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Instantiating chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/or-policy-chaincode.json" else - echo \\"Warning! Skipping chaincode 'or-policy-chaincode' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'or-policy-chaincode' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi - if [ \\"$chaincodeName\\" = \\"and-policy-chaincode\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"and-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/and-policy-chaincode.json\\" + if [ "$chaincodeName" = "and-policy-chaincode" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "and-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Instantiating chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND('Org1MSP.member', 'Org2MSP.member')" "" "collections/and-policy-chaincode.json" else - echo \\"Warning! Skipping chaincode 'and-policy-chaincode' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'and-policy-chaincode' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi } runDevModeChaincode() { - echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" + echo "Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities" exit 1 } upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"or-policy-chaincode\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"or-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + if [ "$chaincodeName" = "or-policy-chaincode" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "or-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "or-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Upgrading as 'Org1'. 'or-policy-chaincode' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/or-policy-chaincode.json\\" + printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Upgrading as 'Org1'. 'or-policy-chaincode' on channel 'my-channel1'" "U1F618" + chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/or-policy-chaincode.json" else - echo \\"Warning! Skipping chaincode 'or-policy-chaincode' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'or-policy-chaincode' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi - if [ \\"$chaincodeName\\" = \\"and-policy-chaincode\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"and-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + if [ "$chaincodeName" = "and-policy-chaincode" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "and-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "and-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Upgrading as 'Org1'. 'and-policy-chaincode' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/and-policy-chaincode.json\\" + printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" + printItalics "Upgrading as 'Org1'. 'and-policy-chaincode' on channel 'my-channel1'" "U1F618" + chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND('Org1MSP.member', 'Org2MSP.member')" "" "collections/and-policy-chaincode.json" else - echo \\"Warning! Skipping chaincode 'and-policy-chaincode' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'and-policy-chaincode' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi } notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Creating new channel config blocks" "U1F537" + createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel1" "Org2MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + printHeadline "Notyfing orgs about channels" "U1F4E2" + notifyOrgAboutNewChannel "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" + notifyOrgAboutNewChannel "my-channel1" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" + printHeadline "Deleting new channel config blocks" "U1F52A" + deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel1" "Org2MSP" "cli.org2.example.com" } printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" + printHeadline "Done! Enjoy your fresh network" "U1F984" } stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + printHeadline "Stopping network" "U1F68F" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) sleep 4 } networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + printHeadline "Destroying network" "U1F916" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-or-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + printf "Removing chaincode containers & images... \\U1F5D1 \\n" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-or-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org1.example.com-or-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org1.example.com-or-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-or-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer1.org1.example.com-or-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer1.org1.example.com-or-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer1.org1.example.com-or-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-or-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer0.org2.example.com-or-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org2.example.com-or-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org2.example.com-or-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-and-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-and-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org1.example.com-and-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org1.example.com-and-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-and-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer1.org1.example.com-and-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer1.org1.example.com-and-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer1.org1.example.com-and-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-and-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer0.org2.example.com-and-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org2.example.com-and-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org2.example.com-and-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + printf "Removing generated configs... \\U1F5D1 \\n" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" + printHeadline "Done! Network was purged" "U1F5D1" } " `; @@ -2664,10 +2664,10 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/\\" - - \\"../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/\\" - - \\"../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/" + - "../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/" + - "../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json" networks: - basic @@ -2736,10 +2736,10 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/\\" - - \\"../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/\\" - - \\"../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/" + - "../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/" + - "../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json" networks: - basic @@ -2753,7 +2753,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2794,7 +2794,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2867,10 +2867,10 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/\\" - - \\"../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/\\" - - \\"../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/" + - "../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/" + - "../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json" networks: - basic @@ -2930,32 +2930,32 @@ certsGenerate() { local OUTPUT_PATH=$4 local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + echo "Generating certs..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" + inputLog "ORG_PATH: $ORG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -d "$FULL_CERT_PATH" ]; then + echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do + dir=$(dirname "$file") + mv "\${dir}"/*_sk "\${dir}"/priv-key.pem done } @@ -2967,26 +2967,26 @@ genesisBlockCreate() { local GENESIS_PROFILE_NAME=$3 local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + echo "Creating genesis block..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" + inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then + echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + mkdir -p "$OUTPUT_PATH" + docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2998,27 +2998,27 @@ createChannelTx() { local CONFIG_PATH=$2 local CONFIG_PROFILE=$3 local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + echo "Creating channelTx for $CHANNEL_NAME..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$CHANNEL_TX_PATH" ]; then + echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -3031,34 +3031,34 @@ createNewChannelUpdateTx() { local CONFIG_PROFILE=$3 local CONFIG_PATH=$4 local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then + echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\ + --configPath ./fabric-config \\ + -profile "\${CONFIG_PROFILE}" \\ + -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ + -channelID "\${CHANNEL_NAME}" \\ + -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -3069,24 +3069,24 @@ notifyOrgAboutNewChannel() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -3096,26 +3096,26 @@ notifyOrgAboutNewChannelTls() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + local CA_CERT="/var/hyperledger/cli/"\${6} + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" \\ + --tls --cafile "$CA_CERT" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -3123,58 +3123,58 @@ deleteNewChannelUpdateTx() { local CHANNEL_NAME=$1 local MSP_NAME=$2 local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" + inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' + bold=$'\\e[1m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' + italics=$'\\e[3m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } certsRemove() { local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" + rm -rf "$CERTS_DIR_PATH" } removeContainer() { CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" + docker rm -f "$CONTAINER_NAME" } " `; @@ -3183,46 +3183,46 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should "#!/usr/bin/env bash printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-docker.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-docker.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-docker.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-docker.sh start" + echo -e "\\t Starts already created network." + echo "" + echo "./fabric-docker.sh stop" + echo -e "\\t Stops already running network." + echo "" + echo "./fabric-docker.sh reset" + echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." + echo "" + echo "./fabric-docker.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" } " `; exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` "#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. # see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" + local IMAGE="$1" + if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then + docker pull --platform linux/x86_64 "$IMAGE" fi } @@ -3232,61 +3232,61 @@ chaincodeBuild() { local CHAINCODE_DIR_PATH=$3 local RECOMMENDED_NODE_VERSION=$4 - mkdir -p \\"$CHAINCODE_DIR_PATH\\" + mkdir -p "$CHAINCODE_DIR_PATH" # pull required images upfront in case of arm64 (Apple Silicon) architecture # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + if [ "$(uname -m)" = "arm64" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + if [ "$CHAINCODE_LANG" = "java" ]; then + dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + if [ "$CHAINCODE_LANG" = "golang" ]; then + dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) set +e source ~/.nvm/nvm.sh set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" + if [ "$(command -v nvm)" == "nvm" ]; then + current_dir="$(pwd)" + cd "$CHAINCODE_DIR_PATH" set +u nvm install set -u - cd \\"$current_dir\\" + cd "$current_dir" fi fi - NODE_VERSION=\\"$(node --version)\\" + NODE_VERSION="$(node --version)" - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" + USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" + if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then + RECOMMENDED_NODE_VERSION="8.9" fi - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then + echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" + echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) + if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then + (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) fi fi } @@ -3301,27 +3301,27 @@ chaincodeInstall() { local ORDERER_URL=$7 local CA_CERT=$8 - echo \\"Installing chaincode on $CHANNEL_NAME...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Installing chaincode on $CHANNEL_NAME..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CHANNEL_NAME="$CHANNEL_NAME" "$CLI_NAME" peer chaincode install \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -p "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ + -o "$ORDERER_URL" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeInstantiate() { @@ -3337,40 +3337,40 @@ chaincodeInstantiate() { local CA_CERT=\${10} local COLLECTIONS_CONFIG=\${11} - echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Instantiating chaincode on $CHANNEL_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + inputLog "INIT_PARAMS: $INIT_PARAMS" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode instantiate \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -o "$ORDERER_URL" \\ + -c "$INIT_PARAMS" \\ + -P "$ENDORSEMENT" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeUpgrade() { @@ -3386,41 +3386,41 @@ chaincodeUpgrade() { local CA_CERT=\${10} local COLLECTIONS_CONFIG=\${11} - echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Upgrading chaincode on $CHANNEL_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + inputLog "INIT_PARAMS: $INIT_PARAMS" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode upgrade \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -p /var/hyperledger/cli/"$CHAINCODE_NAME"/ \\ + -o "$ORDERER_URL" \\ + -c "$INIT_PARAMS" \\ + -P "$ENDORSEMENT" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } " `; @@ -3432,11 +3432,11 @@ peerChannelList() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list } peerChannelGetInfo() { @@ -3444,13 +3444,13 @@ peerChannelGetInfo() { local CLI_NAME=$2 local PEER_ADDRESS=$3 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" } peerChannelFetchConfig() { @@ -3459,53 +3459,53 @@ peerChannelFetchConfig() { local CONFIG_FILE_NAME=$3 local PEER_ADDRESS=$4 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local TARGET_FILE="$5" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } #=== TLS equivalents ========================================================= @@ -3515,11 +3515,11 @@ peerChannelListTls() { local PEER_ADDRESS=$2 local CA_CERT=$3 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" } peerChannelGetInfoTls() { @@ -3528,13 +3528,13 @@ peerChannelGetInfoTls() { local PEER_ADDRESS=$3 local CA_CERT=$4 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" } peerChannelFetchConfigTls() { @@ -3544,54 +3544,54 @@ peerChannelFetchConfigTls() { local PEER_ADDRESS=$4 local CA_CERT=$5 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local CA_CERT="$5" + local TARGET_FILE="$6" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" + + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } " `; @@ -3606,26 +3606,26 @@ createChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Creating channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx + peer channel join -b "\${CHANNEL_NAME}".block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } createChannelAndJoinTls() { @@ -3633,9 +3633,9 @@ createChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -3644,24 +3644,24 @@ createChannelAndJoinTls() { local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Creating channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoin() { @@ -3669,24 +3669,24 @@ fetchChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Fetching channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" + peer channel join -b "\${CHANNEL_NAME}"_newest.block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoinTls() { @@ -3694,9 +3694,9 @@ fetchChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -3705,22 +3705,22 @@ fetchChannelAndJoinTls() { local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } " `; @@ -3729,110 +3729,110 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should "#!/usr/bin/env bash __getOrdererAndPeerNodes() { - echo \\" + echo " orderer0.group1.orderer.example.com peer0.org1.example.com peer1.org1.example.com peer0.org2.example.com - \\" + " } __getCASQLiteNodes() { - echo \\" + echo " ca.orderer.example.com ca.org1.example.com ca.org2.example.com - \\" + " } __getCAPostgresNodes() { - echo \\" - \\" + echo " + " } __createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + cd "$FABLO_NETWORK_ROOT/.." + backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then + echo "Error: Directory '$backup_dir' already exists and is not empty!" exit 1 fi - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" + mkdir -p "$backup_dir" + cp -R ./fablo-target "$backup_dir/" for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node" + docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" done for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node/pg-data" + docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" done for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + echo "Saving state of $node..." + docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" done } __cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" + cd "$FABLO_NETWORK_ROOT/.." + target_dir="$1" + hook_cmd="$2" - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + if [ -d "$target_dir/fablo-target" ]; then + echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." exit 1 fi - cp -R ./fablo-target \\"$target_dir/fablo-target\\" + cp -R ./fablo-target "$target_dir/fablo-target" - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + if [ -n "$hook_cmd" ]; then + echo "Executing pre-restore hook: '$hook_cmd'" + (cd "$target_dir" && eval "$hook_cmd") fi - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" fi done for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" fi done for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + docker cp "./$node/" "$node:/var/hyperledger/production/" fi done } createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") + (set -eu && __createSnapshot "$1") } cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") + (set -eu && __cloneSnapshot "$1" "$2") } " `; @@ -3841,12 +3841,12 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should "#!/usr/bin/env bash # The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" +echo "Executing post-generate hook" " `; exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper files from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -Array [ +[ "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/.gitignore", "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/and-policy-chaincode.json", "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/or-policy-chaincode.json", diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index 942094f1..d6c66470 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -25,13 +25,13 @@ Channel: &ChannelDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Capabilities: <<: *ChannelCapabilities @@ -47,16 +47,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Writers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Admins: Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" + Rule: "OR('OrdererMSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" AnchorPeers: @@ -68,16 +68,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" + Rule: "OR('Org1MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" AnchorPeers: - Host: peer0.org1.example.com @@ -94,16 +94,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org2MSP.admin')\\" + Rule: "OR('Org2MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" AnchorPeers: - Host: peer0.org2.example.com @@ -123,16 +123,16 @@ Application: &ApplicationDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" + Rule: "MAJORITY Endorsement" Capabilities: <<: *ApplicationCapabilities @@ -174,18 +174,18 @@ Orderer: &Group1Defaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" # BlockValidation specifies what signatures must be included in the block # from the orderer for the peer to validate it. BlockValidation: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Capabilities: <<: *OrdererCapabilities @@ -257,73 +257,73 @@ Profiles: exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" + "name": "fablo-test-network-orderer", + "description": "Connection profile for Orderer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer" }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "organizations": { + "Orderer": { + "mspid": "OrdererMSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" + "certificateAuthorities": [ + "ca.orderer.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7042", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"https://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.orderer.example.com": { + "url": "https://localhost:7020", + "caName": "ca.orderer.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -390,73 +390,73 @@ certificateAuthorities: exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Org1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1" }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" + "certificateAuthorities": [ + "ca.org1.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7042", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"https://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.org1.example.com": { + "url": "https://localhost:7040", + "caName": "ca.org1.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -523,73 +523,73 @@ certificateAuthorities: exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Org2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\" + "name": "fablo-test-network-org2", + "description": "Connection profile for Org2 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org2" }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "organizations": { + "Org2": { + "mspid": "Org2MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org2.example.com\\" + "certificateAuthorities": [ + "ca.org2.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7042", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.org2.example.com\\": { - \\"url\\": \\"https://localhost:7060\\", - \\"caName\\": \\"ca.org2.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.org2.example.com": { + "url": "https://localhost:7060", + "caName": "ca.org2.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -695,17 +695,17 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" }, - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + "network-org2": { + "name": "Network of Org2", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; @@ -724,14 +724,14 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -739,9 +739,9 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -759,7 +759,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -826,11 +826,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -842,25 +842,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -881,7 +881,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -900,11 +900,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -916,7 +916,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -924,9 +924,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -958,18 +958,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -998,7 +998,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1019,7 +1019,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1075,7 +1075,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1103,12 +1103,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1225,14 +1225,14 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1240,9 +1240,9 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1260,7 +1260,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1327,11 +1327,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1343,25 +1343,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1382,7 +1382,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1401,11 +1401,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1417,7 +1417,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1425,9 +1425,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1459,18 +1459,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1499,7 +1499,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1520,7 +1520,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1576,7 +1576,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1604,12 +1604,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1726,14 +1726,14 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1741,9 +1741,9 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1761,7 +1761,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1828,11 +1828,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1844,25 +1844,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1883,7 +1883,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1902,11 +1902,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1918,7 +1918,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1926,9 +1926,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1960,18 +1960,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -2000,7 +2000,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -2021,7 +2021,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -2077,7 +2077,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -2105,12 +2105,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -2218,16 +2218,16 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p set -eu -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/.env" +source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" networkUp() { generateArtifacts @@ -2239,45 +2239,45 @@ networkUp() { printStartSuccessInfo } -if [ \\"$1\\" = \\"up\\" ]; then +if [ "$1" = "up" ]; then networkUp -elif [ \\"$1\\" = \\"down\\" ]; then +elif [ "$1" = "down" ]; then networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then +elif [ "$1" = "reset" ]; then networkDown networkUp -elif [ \\"$1\\" = \\"start\\" ]; then +elif [ "$1" = "start" ]; then startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then +elif [ "$1" = "stop" ]; then stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then + chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then +elif [ "$1" = "--help" ]; then printHelp else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" fi " `; @@ -2325,35 +2325,35 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p "#!/usr/bin/env bash chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + elif [ "$1" = "peer0.org1.example.com" ]; then - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + [ "$1" = "peer1.org1.example.com" ] then - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + [ "$1" = "peer0.org2.example.com" ] then - peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org2.example.com" "peer0.org2.example.com:7061" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer1.org2.example.com\\" ] + [ "$1" = "peer1.org2.example.com" ] then - peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org2.example.com" "peer1.org2.example.com:7062" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name else - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" exit 1 fi @@ -2366,58 +2366,58 @@ chaincodeList() { # 4. chaincode command # 5. transient data (optional) chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" exit 1 fi - cli=\\"\\" - peer_addresses=\\"\\" + cli="" + peer_addresses="" - peer_certs=\\"\\" + peer_certs="" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + if [[ "$1" == *"peer0.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer0.org1.example.com:7041" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + if [[ "$1" == *"peer1.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer1.org1.example.com:7042" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + if [[ "$1" == *"peer0.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer0.org2.example.com:7061" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" + if [[ "$1" == *"peer1.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer1.org2.example.com:7062" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt" fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" exit 1 fi - if [ \\"$2\\" = \\"my-channel1\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + if [ "$2" = "my-channel1" ]; then + ca_cert="crypto-orderer/tlsca.orderer.example.com-cert.pem" fi - if [ \\"$2\\" = \\"my-channel2\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + if [ "$2" = "my-channel2" ]; then + ca_cert="crypto-orderer/tlsca.orderer.example.com-cert.pem" fi - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" + peerChaincodeInvokeTls "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" "\${peer_certs:1}" "$ca_cert" } " @@ -2426,175 +2426,175 @@ chaincodeInvoke() { exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` "#!/usr/bin/env bash -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" set -eu channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" + echo "-> Channel query: " + "$@" - if [ \\"$#\\" -eq 1 ]; then + if [ "$#" -eq 1 ]; then printChannelsHelp - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - peerChannelListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] then - peerChannelListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] then - peerChannelListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org2.example.com" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer1" ] then - peerChannelListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org2.example.com" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel1" "cli.org2.example.com" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel1" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel1" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel2" "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel2" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel2" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org2" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel2" "cli.org2.example.com" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel2" "cli.org2.example.com" "$TARGET_FILE" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel2" "cli.org2.example.com" "\${BLOCK_NAME}" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" else - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + echo "$@" + echo "$1, $2, $3, $4, $5, $6, $7, $#" printChannelsHelp fi } printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org2 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org2 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org2 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" + echo "Channel management commands:" + echo "" + + echo "fablo channel list org1 peer0" + echo -e "\\t List channels on 'peer0' of 'Org1'". + echo "" + + echo "fablo channel list org1 peer1" + echo -e "\\t List channels on 'peer1' of 'Org1'". + echo "" + + echo "fablo channel list org2 peer0" + echo -e "\\t List channels on 'peer0' of 'Org2'". + echo "" + + echo "fablo channel list org2 peer1" + echo -e "\\t List channels on 'peer1' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org2 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel1 org2 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel1 org2 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel2 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel2 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel2 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel2 org2 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel2 org2 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel2 org2 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'". + echo "" } " @@ -2604,251 +2604,251 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p "#!/usr/bin/env bash generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" + printHeadline "Generating basic configs" "U1F913" - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Orderer" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org2" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + printItalics "Generating genesis block for group group1" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" } startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + printHeadline "Starting network" "U1F680" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) sleep 4 } generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - printHeadline \\"Generating config for 'my-channel2'\\" \\"U1F913\\" - createChannelTx \\"my-channel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Generating config for 'my-channel1'" "U1F913" + createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" + printHeadline "Generating config for 'my-channel2'" "U1F913" + createChannelTx "my-channel2" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config/config" } installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" - printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - printHeadline \\"Creating 'my-channel2' on Org1/peer1\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + printHeadline "Creating 'my-channel2' on Org1/peer1" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" - printItalics \\"Joining 'my-channel2' on Org2/peer1\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + printItalics "Joining 'my-channel2' on Org2/peer1" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" } installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then - chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" \\"12\\" - printHeadline \\"Installing 'chaincode2' on my-channel2/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode2' on my-channel2/Org2/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple")" ]; then + chaincodeBuild "chaincode2" "java" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple" "12" + printHeadline "Installing 'chaincode2' on my-channel2/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printHeadline "Installing 'chaincode2' on my-channel2/Org2/peer1" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer1.org2.example.com:7062" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printItalics "Instantiating chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" else - echo \\"Warning! Skipping chaincode 'chaincode2' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" + echo "Warning! Skipping chaincode 'chaincode2' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'" fi } installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi - if [ \\"$chaincodeName\\" = \\"chaincode2\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then - chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" \\"12\\" - printHeadline \\"Installing 'chaincode2' on my-channel2/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode2' on my-channel2/Org2/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + if [ "$chaincodeName" = "chaincode2" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple")" ]; then + chaincodeBuild "chaincode2" "java" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple" "12" + printHeadline "Installing 'chaincode2' on my-channel2/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printHeadline "Installing 'chaincode2' on my-channel2/Org2/peer1" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer1.org2.example.com:7062" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printItalics "Instantiating chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'" "U1F618" + chaincodeInstantiate "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" else - echo \\"Warning! Skipping chaincode 'chaincode2' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" + echo "Warning! Skipping chaincode 'chaincode2' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'" fi fi } runDevModeChaincode() { - echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" + echo "Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities" exit 1 } upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printItalics "Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'" "U1F618" + chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" fi fi - if [ \\"$chaincodeName\\" = \\"chaincode2\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then - chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" + if [ "$chaincodeName" = "chaincode2" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple")" ]; then + chaincodeBuild "chaincode2" "java" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple" - printHeadline \\"Installing 'chaincode2' on my-channel2/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline "Installing 'chaincode2' on my-channel2/Org1/peer1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "$version" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline \\"Installing 'chaincode2' on my-channel2/Org2/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Upgrading as 'Org1'. 'chaincode2' on channel 'my-channel2'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + printHeadline "Installing 'chaincode2' on my-channel2/Org2/peer1" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer1.org2.example.com:7062" "my-channel2" "chaincode2" "$version" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + printItalics "Upgrading as 'Org1'. 'chaincode2' on channel 'my-channel2'" "U1F618" + chaincodeUpgrade "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "$version" "java" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" else - echo \\"Warning! Skipping chaincode 'chaincode2' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" + echo "Warning! Skipping chaincode 'chaincode2' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'" fi fi } notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" + printHeadline "Creating new channel config blocks" "U1F537" + createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel1" "Org2MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel2" "Org1MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel2" "Org2MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + + printHeadline "Notyfing orgs about channels" "U1F4E2" + notifyOrgAboutNewChannelTls "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel1" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel2" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel2" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + + printHeadline "Deleting new channel config blocks" "U1F52A" + deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel1" "Org2MSP" "cli.org2.example.com" + deleteNewChannelUpdateTx "my-channel2" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel2" "Org2MSP" "cli.org2.example.com" } printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" + printHeadline "Done! Enjoy your fresh network" "U1F984" } stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + printHeadline "Stopping network" "U1F68F" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) sleep 4 } networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + printHeadline "Destroying network" "U1F916" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + printf "Removing chaincode containers & images... \\U1F5D1 \\n" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer0.org2.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org2.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org2.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode2\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer1.org1.example.com-chaincode2" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer1.org1.example.com-chaincode2*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer1.org1.example.com-chaincode2*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer1.org2.example.com-chaincode2\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer1.org2.example.com-chaincode2" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer1.org2.example.com-chaincode2*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer1.org2.example.com-chaincode2*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + printf "Removing generated configs... \\U1F5D1 \\n" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" + printHeadline "Done! Network was purged" "U1F5D1" } " `; @@ -2913,8 +2913,8 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/" networks: - basic @@ -3076,8 +3076,8 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/" networks: - basic @@ -3091,7 +3091,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -3137,7 +3137,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -3227,8 +3227,8 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/" networks: - basic @@ -3242,7 +3242,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7061 peer1.org2.example.com:7062" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -3288,7 +3288,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org2.example.com:7062 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org2.example.com:7062 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7061 peer1.org2.example.com:7062" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -3339,32 +3339,32 @@ certsGenerate() { local OUTPUT_PATH=$4 local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + echo "Generating certs..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" + inputLog "ORG_PATH: $ORG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -d "$FULL_CERT_PATH" ]; then + echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do + dir=$(dirname "$file") + mv "\${dir}"/*_sk "\${dir}"/priv-key.pem done } @@ -3376,26 +3376,26 @@ genesisBlockCreate() { local GENESIS_PROFILE_NAME=$3 local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + echo "Creating genesis block..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" + inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then + echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + mkdir -p "$OUTPUT_PATH" + docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -3407,27 +3407,27 @@ createChannelTx() { local CONFIG_PATH=$2 local CONFIG_PROFILE=$3 local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + echo "Creating channelTx for $CHANNEL_NAME..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$CHANNEL_TX_PATH" ]; then + echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -3440,34 +3440,34 @@ createNewChannelUpdateTx() { local CONFIG_PROFILE=$3 local CONFIG_PATH=$4 local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then + echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\ + --configPath ./fabric-config \\ + -profile "\${CONFIG_PROFILE}" \\ + -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ + -channelID "\${CHANNEL_NAME}" \\ + -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -3478,24 +3478,24 @@ notifyOrgAboutNewChannel() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -3505,26 +3505,26 @@ notifyOrgAboutNewChannelTls() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + local CA_CERT="/var/hyperledger/cli/"\${6} + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" \\ + --tls --cafile "$CA_CERT" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -3532,58 +3532,58 @@ deleteNewChannelUpdateTx() { local CHANNEL_NAME=$1 local MSP_NAME=$2 local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" + inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' + bold=$'\\e[1m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' + italics=$'\\e[3m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } certsRemove() { local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" + rm -rf "$CERTS_DIR_PATH" } removeContainer() { CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" + docker rm -f "$CONTAINER_NAME" } " `; @@ -3592,46 +3592,46 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p "#!/usr/bin/env bash printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-docker.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-docker.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-docker.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-docker.sh start" + echo -e "\\t Starts already created network." + echo "" + echo "./fabric-docker.sh stop" + echo -e "\\t Stops already running network." + echo "" + echo "./fabric-docker.sh reset" + echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." + echo "" + echo "./fabric-docker.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" } " `; exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` "#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. # see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" + local IMAGE="$1" + if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then + docker pull --platform linux/x86_64 "$IMAGE" fi } @@ -3641,61 +3641,61 @@ chaincodeBuild() { local CHAINCODE_DIR_PATH=$3 local RECOMMENDED_NODE_VERSION=$4 - mkdir -p \\"$CHAINCODE_DIR_PATH\\" + mkdir -p "$CHAINCODE_DIR_PATH" # pull required images upfront in case of arm64 (Apple Silicon) architecture # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + if [ "$(uname -m)" = "arm64" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + if [ "$CHAINCODE_LANG" = "java" ]; then + dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + if [ "$CHAINCODE_LANG" = "golang" ]; then + dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) set +e source ~/.nvm/nvm.sh set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" + if [ "$(command -v nvm)" == "nvm" ]; then + current_dir="$(pwd)" + cd "$CHAINCODE_DIR_PATH" set +u nvm install set -u - cd \\"$current_dir\\" + cd "$current_dir" fi fi - NODE_VERSION=\\"$(node --version)\\" + NODE_VERSION="$(node --version)" - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" + USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" + if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then + RECOMMENDED_NODE_VERSION="8.9" fi - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then + echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" + echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) + if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then + (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) fi fi } @@ -3710,27 +3710,27 @@ chaincodeInstall() { local ORDERER_URL=$7 local CA_CERT=$8 - echo \\"Installing chaincode on $CHANNEL_NAME...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Installing chaincode on $CHANNEL_NAME..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CHANNEL_NAME="$CHANNEL_NAME" "$CLI_NAME" peer chaincode install \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -p "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ + -o "$ORDERER_URL" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeInstantiate() { @@ -3746,40 +3746,40 @@ chaincodeInstantiate() { local CA_CERT=\${10} local COLLECTIONS_CONFIG=\${11} - echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Instantiating chaincode on $CHANNEL_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + inputLog "INIT_PARAMS: $INIT_PARAMS" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode instantiate \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -o "$ORDERER_URL" \\ + -c "$INIT_PARAMS" \\ + -P "$ENDORSEMENT" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeUpgrade() { @@ -3795,41 +3795,41 @@ chaincodeUpgrade() { local CA_CERT=\${10} local COLLECTIONS_CONFIG=\${11} - echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Upgrading chaincode on $CHANNEL_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + inputLog "INIT_PARAMS: $INIT_PARAMS" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode upgrade \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + -l "$CHAINCODE_LANG" \\ + -p /var/hyperledger/cli/"$CHAINCODE_NAME"/ \\ + -o "$ORDERER_URL" \\ + -c "$INIT_PARAMS" \\ + -P "$ENDORSEMENT" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } " `; @@ -3841,11 +3841,11 @@ peerChannelList() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list } peerChannelGetInfo() { @@ -3853,13 +3853,13 @@ peerChannelGetInfo() { local CLI_NAME=$2 local PEER_ADDRESS=$3 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" } peerChannelFetchConfig() { @@ -3868,53 +3868,53 @@ peerChannelFetchConfig() { local CONFIG_FILE_NAME=$3 local PEER_ADDRESS=$4 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local TARGET_FILE="$5" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } #=== TLS equivalents ========================================================= @@ -3924,11 +3924,11 @@ peerChannelListTls() { local PEER_ADDRESS=$2 local CA_CERT=$3 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" } peerChannelGetInfoTls() { @@ -3937,13 +3937,13 @@ peerChannelGetInfoTls() { local PEER_ADDRESS=$3 local CA_CERT=$4 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" } peerChannelFetchConfigTls() { @@ -3953,54 +3953,54 @@ peerChannelFetchConfigTls() { local PEER_ADDRESS=$4 local CA_CERT=$5 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local CA_CERT="$5" + local TARGET_FILE="$6" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" + + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } " `; @@ -4015,26 +4015,26 @@ createChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Creating channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx + peer channel join -b "\${CHANNEL_NAME}".block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } createChannelAndJoinTls() { @@ -4042,9 +4042,9 @@ createChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -4053,24 +4053,24 @@ createChannelAndJoinTls() { local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Creating channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoin() { @@ -4078,24 +4078,24 @@ fetchChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Fetching channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" + peer channel join -b "\${CHANNEL_NAME}"_newest.block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoinTls() { @@ -4103,9 +4103,9 @@ fetchChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -4114,22 +4114,22 @@ fetchChannelAndJoinTls() { local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } " `; @@ -4138,7 +4138,7 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p "#!/usr/bin/env bash __getOrdererAndPeerNodes() { - echo \\" + echo " orderer0.group1.orderer.example.com orderer1.group1.orderer.example.com orderer2.group1.orderer.example.com @@ -4146,105 +4146,105 @@ __getOrdererAndPeerNodes() { peer1.org1.example.com peer0.org2.example.com peer1.org2.example.com - \\" + " } __getCASQLiteNodes() { - echo \\" + echo " ca.orderer.example.com ca.org1.example.com ca.org2.example.com - \\" + " } __getCAPostgresNodes() { - echo \\" - \\" + echo " + " } __createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + cd "$FABLO_NETWORK_ROOT/.." + backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then + echo "Error: Directory '$backup_dir' already exists and is not empty!" exit 1 fi - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" + mkdir -p "$backup_dir" + cp -R ./fablo-target "$backup_dir/" for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node" + docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" done for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node/pg-data" + docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" done for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + echo "Saving state of $node..." + docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" done } __cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" + cd "$FABLO_NETWORK_ROOT/.." + target_dir="$1" + hook_cmd="$2" - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + if [ -d "$target_dir/fablo-target" ]; then + echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." exit 1 fi - cp -R ./fablo-target \\"$target_dir/fablo-target\\" + cp -R ./fablo-target "$target_dir/fablo-target" - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + if [ -n "$hook_cmd" ]; then + echo "Executing pre-restore hook: '$hook_cmd'" + (cd "$target_dir" && eval "$hook_cmd") fi - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" fi done for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" fi done for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + docker cp "./$node/" "$node:/var/hyperledger/production/" fi done } createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") + (set -eu && __createSnapshot "$1") } cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") + (set -eu && __cloneSnapshot "$1" "$2") } " `; @@ -4253,12 +4253,12 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p "#!/usr/bin/env bash # The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" +echo "Executing post-generate hook" " `; exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper files from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -Array [ +[ "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/.gitignore", "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml", "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap index 93cdf9af..06005696 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-k8s.json.test.ts.snap @@ -11,71 +11,71 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper set -e -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" -source \\"$FABLO_NETWORK_ROOT/fabric-k8s/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-k8s/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-k8s/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-k8s/.env\\" +source "$FABLO_NETWORK_ROOT/fabric-k8s/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-k8s/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-k8s/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-k8s/.env" # location of generated configurations -CONFIG_DIR=\\"$FABLO_NETWORK_ROOT/fabric-config\\" +CONFIG_DIR="$FABLO_NETWORK_ROOT/fabric-config" -RESETBG=\\"$(printf '\\\\e[0m\\\\n')\\" -BLUE=\\"$(printf '\\\\033[34m')\\" +RESETBG="$(printf '\\e[0m\\n')" +BLUE="$(printf '\\033[34m')" networkUp() { - printHeadline \\"Checking dependencies...\\" \\"U1F984\\" + printHeadline "Checking dependencies..." "U1F984" verifyKubernetesConnectivity - printHeadline \\"Starting Network...\\" \\"U1F984\\" + printHeadline "Starting Network..." "U1F984" deployPeer deployOrderer installChannels installChaincodes - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" + printHeadline "Done! Enjoy your fresh network" "U1F984" } networkDown() { - printHeadline \\"Destroying network\\" \\"U1F913\\" + printHeadline "Destroying network" "U1F913" destroyNetwork } -if [ \\"$1\\" = \\"up\\" ]; then +if [ "$1" = "up" ]; then networkUp -elif [ \\"$1\\" = \\"down\\" ]; then +elif [ "$1" = "down" ]; then networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then +elif [ "$1" = "reset" ]; then networkDown sleep 60 networkUp -elif [ \\"$1\\" = \\"start\\" ]; then +elif [ "$1" = "start" ]; then startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then +elif [ "$1" = "stop" ]; then stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then +elif [ "$1" = "--help" ]; then printHelp else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" fi " `; @@ -83,7 +83,7 @@ fi exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-k8s.json.tmpdir/fablo-target/fabric-k8s/.env from samples/fablo-config-hlf2-1org-1chaincode-k8s.json 1`] = ` "NAMESPACE=default -REPOSITORY=\\"https://kfsoftware.github.io/hlf-helm-charts\\" +REPOSITORY="https://kfsoftware.github.io/hlf-helm-charts" STORAGE_CLASS=$(kubectl describe sc | grep Name | tr -s ' ' | cut -d ':' -f 2 | cut -d ' ' -f 2) FABLO_VERSION=1.2.1-unstable.0 @@ -115,118 +115,118 @@ ORG1_CA_ADMIN_PASSWORD=adminpw exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-k8s.json.tmpdir/fablo-target/fabric-k8s/scripts/base-functions.sh from samples/fablo-config-hlf2-1org-1chaincode-k8s.json 1`] = ` "#!/usr/bin/env bash -source \\"$FABLO_NETWORK_ROOT/fabric-k8s/scripts/util.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-k8s/scripts/util.sh" deployPeer() { - printItalics \\"Deploying Org1 CA\\" \\"U1F984\\" - kubectl hlf ca create --image=\\"$CA_IMAGE\\" --version=\\"$CA_VERSION\\" --storage-class=\\"$STORAGE_CLASS\\" --capacity=2Gi --name=org1-ca --enroll-id=org1 --enroll-pw=\\"$ORG1_CA_ADMIN_PASSWORD\\" + printItalics "Deploying Org1 CA" "U1F984" + kubectl hlf ca create --image="$CA_IMAGE" --version="$CA_VERSION" --storage-class="$STORAGE_CLASS" --capacity=2Gi --name=org1-ca --enroll-id=org1 --enroll-pw="$ORG1_CA_ADMIN_PASSWORD" sleep 3 - while [[ $(kubectl get pods -l release=org1-ca -o 'jsonpath={..status.conditions[?(@.type==\\"Ready\\")].status}') != \\"True\\" ]]; do + while [[ $(kubectl get pods -l release=org1-ca -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do sleep 5 - inputLog \\"waiting for CA\\" + inputLog "waiting for CA" done - kubectl hlf ca register --name=org1-ca --user=peer --secret=\\"$ORG1_CA_ADMIN_PASSWORD\\" --type=peer --enroll-id org1 --enroll-secret=\\"$ORG1_CA_ADMIN_PASSWORD\\" --mspid Org1MSP - inputLog \\"registered Org1 -ca\\" + kubectl hlf ca register --name=org1-ca --user=peer --secret="$ORG1_CA_ADMIN_PASSWORD" --type=peer --enroll-id org1 --enroll-secret="$ORG1_CA_ADMIN_PASSWORD" --mspid Org1MSP + inputLog "registered Org1 -ca" - printItalics \\"Deploying Peers\\" \\"U1F984\\" + printItalics "Deploying Peers" "U1F984" sleep 10 - kubectl hlf peer create --statedb=leveldb --version=\\"$PEER_VERSION\\" --storage-class=\\"$STORAGE_CLASS\\" --enroll-id=peer --mspid=Org1MSP \\\\ - --enroll-pw=\\"$ORG1_CA_ADMIN_PASSWORD\\" --capacity=5Gi --name=peer0 --ca-name=\\"org1-ca.$NAMESPACE\\" --k8s-builder=true --external-service-builder=false + kubectl hlf peer create --statedb=leveldb --version="$PEER_VERSION" --storage-class="$STORAGE_CLASS" --enroll-id=peer --mspid=Org1MSP \\ + --enroll-pw="$ORG1_CA_ADMIN_PASSWORD" --capacity=5Gi --name=peer0 --ca-name="org1-ca.$NAMESPACE" --k8s-builder=true --external-service-builder=false - kubectl hlf peer create --statedb=leveldb --version=\\"$PEER_VERSION\\" --storage-class=\\"$STORAGE_CLASS\\" --enroll-id=peer --mspid=Org1MSP \\\\ - --enroll-pw=\\"$ORG1_CA_ADMIN_PASSWORD\\" --capacity=5Gi --name=peer1 --ca-name=\\"org1-ca.$NAMESPACE\\" --k8s-builder=true --external-service-builder=false + kubectl hlf peer create --statedb=leveldb --version="$PEER_VERSION" --storage-class="$STORAGE_CLASS" --enroll-id=peer --mspid=Org1MSP \\ + --enroll-pw="$ORG1_CA_ADMIN_PASSWORD" --capacity=5Gi --name=peer1 --ca-name="org1-ca.$NAMESPACE" --k8s-builder=true --external-service-builder=false - while [[ $(kubectl get pods -l app=hlf-peer --output=jsonpath='{.items[*].status.containerStatuses[0].ready}') != \\"true true\\" ]]; do + while [[ $(kubectl get pods -l app=hlf-peer --output=jsonpath='{.items[*].status.containerStatuses[0].ready}') != "true true" ]]; do sleep 5 - inputLog \\"waiting for peer nodes to be ready\\" + inputLog "waiting for peer nodes to be ready" done } deployOrderer() { - printItalics \\"Deploying Orderers\\" \\"U1F984\\" + printItalics "Deploying Orderers" "U1F984" - kubectl hlf ca create --storage-class=\\"$STORAGE_CLASS\\" --capacity=2Gi --name=orderer-ca --enroll-id=orderer --enroll-pw=\\"$ORDERER_CA_ADMIN_PASSWORD\\" - while [[ $(kubectl get pods -l release=orderer-ca -o 'jsonpath={..status.conditions[?(@.type==\\"Ready\\")].status}') != \\"True\\" ]]; do + kubectl hlf ca create --storage-class="$STORAGE_CLASS" --capacity=2Gi --name=orderer-ca --enroll-id=orderer --enroll-pw="$ORDERER_CA_ADMIN_PASSWORD" + while [[ $(kubectl get pods -l release=orderer-ca -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do sleep 5 - inputLog \\"waiting for orderer-ca CA to be ready\\" \\"$RESETBG\\" + inputLog "waiting for orderer-ca CA to be ready" "$RESETBG" done - kubectl hlf ca register --name=orderer-ca --user=\\"$ORDERER_CA_ADMIN_NAME\\" --secret=\\"$ORDERER_CA_ADMIN_PASSWORD\\" --type=orderer --enroll-id=orderer --enroll-secret=\\"$ORDERER_CA_ADMIN_PASSWORD\\" --mspid OrdererMSP && - inputLog \\"registered orderer-ca\\" + kubectl hlf ca register --name=orderer-ca --user="$ORDERER_CA_ADMIN_NAME" --secret="$ORDERER_CA_ADMIN_PASSWORD" --type=orderer --enroll-id=orderer --enroll-secret="$ORDERER_CA_ADMIN_PASSWORD" --mspid OrdererMSP && + inputLog "registered orderer-ca" - kubectl hlf ordnode create --version=\\"$ORDERER_VERSION\\" \\\\ - --storage-class=\\"$STORAGE_CLASS\\" --enroll-id=\\"$ORDERER_CA_ADMIN_NAME\\" --mspid=OrdererMSP \\\\ - --enroll-pw=\\"$ORDERER_CA_ADMIN_PASSWORD\\" --capacity=2Gi --name=orderer-node --ca-name=\\"orderer-ca.$NAMESPACE\\" - while [[ $(kubectl get pods -l app=hlf-ordnode -o 'jsonpath={..status.conditions[?(@.type==\\"Ready\\")].status}') != \\"True\\" ]]; do + kubectl hlf ordnode create --version="$ORDERER_VERSION" \\ + --storage-class="$STORAGE_CLASS" --enroll-id="$ORDERER_CA_ADMIN_NAME" --mspid=OrdererMSP \\ + --enroll-pw="$ORDERER_CA_ADMIN_PASSWORD" --capacity=2Gi --name=orderer-node --ca-name="orderer-ca.$NAMESPACE" + while [[ $(kubectl get pods -l app=hlf-ordnode -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do sleep 5 - inputLog \\"waiting for orderer Node to be ready\\" + inputLog "waiting for orderer Node to be ready" done - kubectl hlf inspect --output \\"$CONFIG_DIR/ordservice.yaml\\" -o OrdererMSP - kubectl hlf ca enroll --name=orderer-ca --user=\\"$ORDERER_CA_ADMIN_NAME\\" --secret=\\"$ORDERER_CA_ADMIN_PASSWORD\\" --mspid OrdererMSP --ca-name ca --output \\"$CONFIG_DIR/admin-ordservice.yaml\\" && - kubectl hlf utils adduser --userPath=\\"$CONFIG_DIR/admin-ordservice.yaml\\" --config=\\"$CONFIG_DIR/ordservice.yaml\\" --username=\\"$ORDERER_CA_ADMIN_NAME\\" --mspid=OrdererMSP + kubectl hlf inspect --output "$CONFIG_DIR/ordservice.yaml" -o OrdererMSP + kubectl hlf ca enroll --name=orderer-ca --user="$ORDERER_CA_ADMIN_NAME" --secret="$ORDERER_CA_ADMIN_PASSWORD" --mspid OrdererMSP --ca-name ca --output "$CONFIG_DIR/admin-ordservice.yaml" && + kubectl hlf utils adduser --userPath="$CONFIG_DIR/admin-ordservice.yaml" --config="$CONFIG_DIR/ordservice.yaml" --username="$ORDERER_CA_ADMIN_NAME" --mspid=OrdererMSP } installChannels() { - printItalics \\"Creating 'my-channel1' on /peer0\\" \\"U1F63B\\" + printItalics "Creating 'my-channel1' on /peer0" "U1F63B" sleep 10 - kubectl hlf channel generate --output=\\"$CONFIG_DIR/my-channel1.block\\" --name=my-channel1 --organizations Org1MSP --ordererOrganizations OrdererMSP && - kubectl hlf ca enroll --name=orderer-ca --namespace=\\"$NAMESPACE\\" --user=\\"$ORG1_CA_ADMIN_NAME\\" --secret=\\"$ORG1_CA_ADMIN_PASSWORD\\" --mspid OrdererMSP --ca-name=tlsca --output \\"$CONFIG_DIR/admin-tls-ordservice.yaml\\" && + kubectl hlf channel generate --output="$CONFIG_DIR/my-channel1.block" --name=my-channel1 --organizations Org1MSP --ordererOrganizations OrdererMSP && + kubectl hlf ca enroll --name=orderer-ca --namespace="$NAMESPACE" --user="$ORG1_CA_ADMIN_NAME" --secret="$ORG1_CA_ADMIN_PASSWORD" --mspid OrdererMSP --ca-name=tlsca --output "$CONFIG_DIR/admin-tls-ordservice.yaml" && sleep 10 - kubectl hlf ordnode join --block=\\"$CONFIG_DIR/my-channel1.block\\" --name=orderer-node --namespace=\\"$NAMESPACE\\" --identity=\\"$CONFIG_DIR/admin-tls-ordservice.yaml\\" + kubectl hlf ordnode join --block="$CONFIG_DIR/my-channel1.block" --name=orderer-node --namespace="$NAMESPACE" --identity="$CONFIG_DIR/admin-tls-ordservice.yaml" - kubectl hlf ca register --name=org1-ca --user=\\"$ORG1_CA_ADMIN_NAME\\" --secret=\\"$ORG1_CA_ADMIN_PASSWORD\\" --type=admin --enroll-id org1 --enroll-secret=\\"$ORG1_CA_ADMIN_PASSWORD\\" --mspid Org1MSP && - kubectl hlf ca enroll --name=org1-ca --user=\\"$ORG1_CA_ADMIN_NAME\\" --secret=\\"$ORG1_CA_ADMIN_PASSWORD\\" --mspid Org1MSP --ca-name ca --output \\"$CONFIG_DIR/peer-Org1.yaml\\" && - kubectl hlf inspect --output \\"$CONFIG_DIR/Org1.yaml\\" -o \\"Org1MSP\\" -o \\"OrdererMSP\\" && - kubectl hlf utils adduser --userPath=\\"$CONFIG_DIR/peer-Org1.yaml\\" --config=\\"$CONFIG_DIR/Org1.yaml\\" --username=\\"$ORG1_CA_ADMIN_NAME\\" --mspid=Org1MSP && + kubectl hlf ca register --name=org1-ca --user="$ORG1_CA_ADMIN_NAME" --secret="$ORG1_CA_ADMIN_PASSWORD" --type=admin --enroll-id org1 --enroll-secret="$ORG1_CA_ADMIN_PASSWORD" --mspid Org1MSP && + kubectl hlf ca enroll --name=org1-ca --user="$ORG1_CA_ADMIN_NAME" --secret="$ORG1_CA_ADMIN_PASSWORD" --mspid Org1MSP --ca-name ca --output "$CONFIG_DIR/peer-Org1.yaml" && + kubectl hlf inspect --output "$CONFIG_DIR/Org1.yaml" -o "Org1MSP" -o "OrdererMSP" && + kubectl hlf utils adduser --userPath="$CONFIG_DIR/peer-Org1.yaml" --config="$CONFIG_DIR/Org1.yaml" --username="$ORG1_CA_ADMIN_NAME" --mspid=Org1MSP && sleep 10 - printItalics \\"Joining 'my-channel1' on org1/peer0\\" \\"U1F638\\" - kubectl hlf channel join --name=my-channel1 --config=\\"$CONFIG_DIR/Org1.yaml\\" --user=\\"$ORG1_CA_ADMIN_NAME\\" -p=\\"peer0.$NAMESPACE\\" + printItalics "Joining 'my-channel1' on org1/peer0" "U1F638" + kubectl hlf channel join --name=my-channel1 --config="$CONFIG_DIR/Org1.yaml" --user="$ORG1_CA_ADMIN_NAME" -p="peer0.$NAMESPACE" - printItalics \\"Joining 'my-channel1' on org1/peer1\\" \\"U1F638\\" - kubectl hlf channel join --name=my-channel1 --config=\\"$CONFIG_DIR/Org1.yaml\\" --user=\\"$ORG1_CA_ADMIN_NAME\\" -p=\\"peer1.$NAMESPACE\\" + printItalics "Joining 'my-channel1' on org1/peer1" "U1F638" + kubectl hlf channel join --name=my-channel1 --config="$CONFIG_DIR/Org1.yaml" --user="$ORG1_CA_ADMIN_NAME" -p="peer1.$NAMESPACE" # add anchor peers - printItalics \\"Electing on org1/peer0 as Anchor peer\\" \\"U1F638\\" - kubectl hlf channel addanchorpeer --channel=my-channel1 --config=\\"$CONFIG_DIR/Org1.yaml\\" --user=\\"$ORG1_CA_ADMIN_NAME\\" --peer=\\"peer0.$NAMESPACE\\" + printItalics "Electing on org1/peer0 as Anchor peer" "U1F638" + kubectl hlf channel addanchorpeer --channel=my-channel1 --config="$CONFIG_DIR/Org1.yaml" --user="$ORG1_CA_ADMIN_NAME" --peer="peer0.$NAMESPACE" - printItalics \\"Electing on org1/peer1 as Anchor peer\\" \\"U1F638\\" - kubectl hlf channel addanchorpeer --channel=my-channel1 --config=\\"$CONFIG_DIR/Org1.yaml\\" --user=\\"$ORG1_CA_ADMIN_NAME\\" --peer=\\"peer1.$NAMESPACE\\" + printItalics "Electing on org1/peer1 as Anchor peer" "U1F638" + kubectl hlf channel addanchorpeer --channel=my-channel1 --config="$CONFIG_DIR/Org1.yaml" --user="$ORG1_CA_ADMIN_NAME" --peer="peer1.$NAMESPACE" } installChaincodes() { - printItalics \\"Installing chaincodes....\\" \\"U1F618\\" + printItalics "Installing chaincodes...." "U1F618" - printItalics \\"Building chaincode chaincode1\\" \\"U1F618\\" - buildAndInstallChaincode \\"chaincode1\\" \\"peer0.$NAMESPACE\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"0.0.1\\" \\"$ORG1_CA_ADMIN_NAME\\" \\"$CONFIG_DIR/Org1.yaml\\" + printItalics "Building chaincode chaincode1" "U1F618" + buildAndInstallChaincode "chaincode1" "peer0.$NAMESPACE" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "0.0.1" "$ORG1_CA_ADMIN_NAME" "$CONFIG_DIR/Org1.yaml" - printItalics \\"Approving chaincode....\\" \\"U1F618\\" - approveChaincode \\"chaincode1\\" \\"peer0.$NAMESPACE\\" \\"0.0.1\\" \\"my-channel1\\" \\"$ORG1_CA_ADMIN_NAME\\" \\"$CONFIG_DIR/Org1.yaml\\" \\"Org1MSP\\" + printItalics "Approving chaincode...." "U1F618" + approveChaincode "chaincode1" "peer0.$NAMESPACE" "0.0.1" "my-channel1" "$ORG1_CA_ADMIN_NAME" "$CONFIG_DIR/Org1.yaml" "Org1MSP" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' \\" \\"U1F618\\" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' " "U1F618" - commitChaincode \\"chaincode1\\" \\"peer0.$NAMESPACE\\" \\"0.0.1\\" \\"my-channel1\\" \\"$ORG1_CA_ADMIN_NAME\\" \\"$CONFIG_DIR/Org1.yaml\\" \\"Org1MSP\\" + commitChaincode "chaincode1" "peer0.$NAMESPACE" "0.0.1" "my-channel1" "$ORG1_CA_ADMIN_NAME" "$CONFIG_DIR/Org1.yaml" "Org1MSP" - printItalics \\"Building chaincode chaincode1\\" \\"U1F618\\" - buildAndInstallChaincode \\"chaincode1\\" \\"peer1.$NAMESPACE\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"0.0.1\\" \\"$ORG1_CA_ADMIN_NAME\\" \\"$CONFIG_DIR/Org1.yaml\\" + printItalics "Building chaincode chaincode1" "U1F618" + buildAndInstallChaincode "chaincode1" "peer1.$NAMESPACE" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "0.0.1" "$ORG1_CA_ADMIN_NAME" "$CONFIG_DIR/Org1.yaml" - printItalics \\"Approving chaincode....\\" \\"U1F618\\" - approveChaincode \\"chaincode1\\" \\"peer1.$NAMESPACE\\" \\"0.0.1\\" \\"my-channel1\\" \\"$ORG1_CA_ADMIN_NAME\\" \\"$CONFIG_DIR/Org1.yaml\\" \\"Org1MSP\\" + printItalics "Approving chaincode...." "U1F618" + approveChaincode "chaincode1" "peer1.$NAMESPACE" "0.0.1" "my-channel1" "$ORG1_CA_ADMIN_NAME" "$CONFIG_DIR/Org1.yaml" "Org1MSP" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' \\" \\"U1F618\\" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' " "U1F618" - commitChaincode \\"chaincode1\\" \\"peer1.$NAMESPACE\\" \\"0.0.1\\" \\"my-channel1\\" \\"$ORG1_CA_ADMIN_NAME\\" \\"$CONFIG_DIR/Org1.yaml\\" \\"Org1MSP\\" + commitChaincode "chaincode1" "peer1.$NAMESPACE" "0.0.1" "my-channel1" "$ORG1_CA_ADMIN_NAME" "$CONFIG_DIR/Org1.yaml" "Org1MSP" } @@ -238,65 +238,65 @@ destroyNetwork() { } printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' + bold=$'\\e[1m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' + italics=$'\\e[3m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } verifyKubernetesConnectivity() { - echo \\"Verifying kubectl-hlf installation...\\" + echo "Verifying kubectl-hlf installation..." if ! [[ $(command -v kubectl-hlf) ]]; then - echo \\"Error: Fablo could not detect kubectl hlf plugin. Ensure you have installed: + echo "Error: Fablo could not detect kubectl hlf plugin. Ensure you have installed: - kubectl - https://kubernetes.io/docs/tasks/tools/ - helm - https://helm.sh/docs/intro/install/ - krew - https://krew.sigs.k8s.io/docs/user-guide/setup/install/ - - hlf-operator along with krew hlf plugin - https://github.com/hyperledger-labs/hlf-operator#install-kubernetes-operator\\" + - hlf-operator along with krew hlf plugin - https://github.com/hyperledger-labs/hlf-operator#install-kubernetes-operator" exit 1 else - echo \\" $(command -v kubectl-hlf)\\" + echo " $(command -v kubectl-hlf)" fi - if [ \\"$(kubectl get pods -l=app.kubernetes.io/name=hlf-operator -o jsonpath='{.items}')\\" = \\"[]\\" ]; then - echo \\"Error: hlf-operator is not running. You can install it with: - helm install hlf-operator --version=1.6.0 kfs/hlf-operator\\" + if [ "$(kubectl get pods -l=app.kubernetes.io/name=hlf-operator -o jsonpath='{.items}')" = "[]" ]; then + echo "Error: hlf-operator is not running. You can install it with: + helm install hlf-operator --version=1.6.0 kfs/hlf-operator" exit 1 fi - echo \\"Verifying default kubernetes cluster\\" + echo "Verifying default kubernetes cluster" if ! kubectl get ns default >/dev/null 2>&1; then - printf \\"No K8 cluster detected\\\\n\\" >&2 + printf "No K8 cluster detected\\n" >&2 exit 1 fi - while [ \\"$(kubectl get pods -l=app.kubernetes.io/name=hlf-operator -o jsonpath='{.items[*].status.containerStatuses[0].ready}')\\" != \\"true\\" ]; do + while [ "$(kubectl get pods -l=app.kubernetes.io/name=hlf-operator -o jsonpath='{.items[*].status.containerStatuses[0].ready}')" != "true" ]; do sleep 5 - echo \\"$BLUE\\" \\"Waiting for Operator to be ready.\\" \\"$RESETBG\\" + echo "$BLUE" "Waiting for Operator to be ready." "$RESETBG" done } " @@ -306,24 +306,24 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper "#!/usr/bin/env bash printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-k8.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-k8.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-k8.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-k8.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-k8.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-k8.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-k8.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-k8.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" } " `; @@ -332,120 +332,120 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper "#!/usr/bin/env bash buildAndInstallChaincode() { - local CHAINCODE_NAME=\\"$1\\" - local PEER=\\"$2\\" - local CHAINCODE_LANG=\\"$3\\" - local CHAINCODE_DIR_PATH=\\"$4\\" - local CHAINCODE_VERSION=\\"$5\\" - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" - local USER=\\"$6\\" - local CONFIG=\\"$7\\" - - if [ -z \\"$CHAINCODE_NAME\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local CHAINCODE_NAME="$1" + local PEER="$2" + local CHAINCODE_LANG="$3" + local CHAINCODE_DIR_PATH="$4" + local CHAINCODE_VERSION="$5" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" + local USER="$6" + local CONFIG="$7" + + if [ -z "$CHAINCODE_NAME" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - if [ -z \\"$PEER\\" ]; then - echo \\"Error: peer number is not provided e.g 0, 1\\" + if [ -z "$PEER" ]; then + echo "Error: peer number is not provided e.g 0, 1" exit 1 fi - if [ -z \\"$CHAINCODE_LANG\\" ]; then - echo \\"Error: chaincode language is not provided\\" + if [ -z "$CHAINCODE_LANG" ]; then + echo "Error: chaincode language is not provided" exit 1 fi - if [ -z \\"$CHAINCODE_VERSION\\" ]; then - echo \\"Error: chaincode version is not provided e.g 1.0, 2.0\\" + if [ -z "$CHAINCODE_VERSION" ]; then + echo "Error: chaincode version is not provided e.g 1.0, 2.0" exit 1 fi - kubectl hlf chaincode install --path=\\"$CHAINCODE_DIR_PATH\\" \\\\ - --config=\\"$CONFIG\\" --language=\\"$CHAINCODE_LANG\\" --label=\\"$CHAINCODE_LABEL\\" --user=\\"$USER\\" --peer=\\"$PEER\\" + kubectl hlf chaincode install --path="$CHAINCODE_DIR_PATH" \\ + --config="$CONFIG" --language="$CHAINCODE_LANG" --label="$CHAINCODE_LABEL" --user="$USER" --peer="$PEER" } approveChaincode() { - local CHAINCODE_NAME=\\"$1\\" - local PEER=\\"$2\\" - local CHAINCODE_VERSION=\\"$3\\" - local CHANNEL_NAME=\\"$4\\" - local USER=\\"$5\\" - local CONFIG=\\"$6\\" - local MSP=\\"$7\\" + local CHAINCODE_NAME="$1" + local PEER="$2" + local CHAINCODE_VERSION="$3" + local CHANNEL_NAME="$4" + local USER="$5" + local CONFIG="$6" + local MSP="$7" local SEQUENCE - SEQUENCE=\\"$(kubectl hlf chaincode querycommitted --channel=\\"$CHANNEL_NAME\\" --config=\\"$CONFIG\\" --user=\\"$USER\\" --peer=\\"$PEER\\" 2>/dev/null | awk '{print $3}' | sed -n '2p')\\" + SEQUENCE="$(kubectl hlf chaincode querycommitted --channel="$CHANNEL_NAME" --config="$CONFIG" --user="$USER" --peer="$PEER" 2>/dev/null | awk '{print $3}' | sed -n '2p')" SEQUENCE=$((SEQUENCE + 1)) - if [ -z \\"$CHAINCODE_NAME\\" ]; then - echo \\"Error: chaincode name is not provided\\" + if [ -z "$CHAINCODE_NAME" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - if [ -z \\"$PEER\\" ]; then - echo \\"Error: peer number is not provided e.g 0, 1\\" + if [ -z "$PEER" ]; then + echo "Error: peer number is not provided e.g 0, 1" exit 1 fi - if [ -z \\"$CHAINCODE_VERSION\\" ]; then - echo \\"Error: chaincode version is not provided e.g 1.0, 2.0\\" + if [ -z "$CHAINCODE_VERSION" ]; then + echo "Error: chaincode version is not provided e.g 1.0, 2.0" exit 1 fi - if [ -z \\"$CHANNEL_NAME\\" ]; then - echo \\"Error: channel name is not provided\\" + if [ -z "$CHANNEL_NAME" ]; then + echo "Error: channel name is not provided" exit 1 fi - PACKAGE_ID=\\"$(kubectl hlf chaincode queryinstalled --config=\\"$CONFIG\\" --user=\\"$USER\\" --peer=\\"$PEER\\" | awk '{print $1}' | grep chaincode)\\" + PACKAGE_ID="$(kubectl hlf chaincode queryinstalled --config="$CONFIG" --user="$USER" --peer="$PEER" | awk '{print $1}' | grep chaincode)" - printItalics \\"Approving chaincode $CHAINCODE_NAME on $PEER\\" \\"U1F618\\" + printItalics "Approving chaincode $CHAINCODE_NAME on $PEER" "U1F618" - kubectl hlf chaincode approveformyorg --config=\\"$CONFIG\\" --user=\\"$USER\\" --peer=\\"$PEER\\" \\\\ - --package-id=\\"$PACKAGE_ID\\" --version \\"$CHAINCODE_VERSION\\" --sequence \\"$SEQUENCE\\" --name=\\"$CHAINCODE_NAME\\" \\\\ - --policy=\\"OR('$MSP.member')\\" --channel=\\"$CHANNEL_NAME\\" + kubectl hlf chaincode approveformyorg --config="$CONFIG" --user="$USER" --peer="$PEER" \\ + --package-id="$PACKAGE_ID" --version "$CHAINCODE_VERSION" --sequence "$SEQUENCE" --name="$CHAINCODE_NAME" \\ + --policy="OR('$MSP.member')" --channel="$CHANNEL_NAME" } commitChaincode() { - local CHAINCODE_NAME=\\"$1\\" + local CHAINCODE_NAME="$1" local PEER=$2 - local CHAINCODE_VERSION=\\"$3\\" - local CHANNEL_NAME=\\"$4\\" - local USER=\\"$5\\" - local CONFIG=\\"$6\\" - local MSP=\\"$7\\" + local CHAINCODE_VERSION="$3" + local CHANNEL_NAME="$4" + local USER="$5" + local CONFIG="$6" + local MSP="$7" local SEQUENCE - SEQUENCE=\\"$(kubectl hlf chaincode querycommitted --channel=\\"$CHANNEL_NAME\\" --config=\\"$CONFIG\\" --user=\\"$USER\\" --peer=\\"$PEER\\" 2>/dev/null | awk '{print $3}' | sed -n '2p')\\" + SEQUENCE="$(kubectl hlf chaincode querycommitted --channel="$CHANNEL_NAME" --config="$CONFIG" --user="$USER" --peer="$PEER" 2>/dev/null | awk '{print $3}' | sed -n '2p')" SEQUENCE=$((SEQUENCE + 1)) - if [ -z \\"$CHAINCODE_NAME\\" ]; then - echo \\"Error: chaincode name is not provided\\" + if [ -z "$CHAINCODE_NAME" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - if [ -z \\"$PEER\\" ]; then - echo \\"Error: peer number is not provided e.g 0, 1\\" + if [ -z "$PEER" ]; then + echo "Error: peer number is not provided e.g 0, 1" exit 1 fi - if [ -z \\"$CHAINCODE_VERSION\\" ]; then - echo \\"Error: chaincode version is not provided e.g 1.0, 2.0\\" + if [ -z "$CHAINCODE_VERSION" ]; then + echo "Error: chaincode version is not provided e.g 1.0, 2.0" exit 1 fi - if [ -z \\"$CHANNEL_NAME\\" ]; then - echo \\"Error: channel name is not provided\\" + if [ -z "$CHANNEL_NAME" ]; then + echo "Error: channel name is not provided" exit 1 fi - PACKAGE_ID=\\"$(kubectl hlf chaincode queryinstalled --config=\\"$CONFIG\\" --user=\\"$USER\\" --peer=\\"$PEER\\" | awk '{print $1}' | grep chaincode)\\" + PACKAGE_ID="$(kubectl hlf chaincode queryinstalled --config="$CONFIG" --user="$USER" --peer="$PEER" | awk '{print $1}' | grep chaincode)" - kubectl hlf chaincode commit --config=\\"$CONFIG\\" --user=\\"$USER\\" --mspid=\\"$MSP\\" \\\\ - --version \\"$CHAINCODE_VERSION\\" --sequence \\"$SEQUENCE\\" --name=\\"$CHAINCODE_NAME\\" \\\\ - --policy=\\"OR('$MSP.member')\\" --channel=\\"$CHANNEL_NAME\\" + kubectl hlf chaincode commit --config="$CONFIG" --user="$USER" --mspid="$MSP" \\ + --version "$CHAINCODE_VERSION" --sequence "$SEQUENCE" --name="$CHAINCODE_NAME" \\ + --policy="OR('$MSP.member')" --channel="$CHANNEL_NAME" } " `; @@ -456,21 +456,21 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper retry() { local n=0 local try=$1 - local cmd=\\"\${*:2}\\" + local cmd="\${*:2}" [[ $# -le 1 ]] until [[ $n -ge $try ]]; do if [[ $cmd ]]; then break else - echo $(printf '\\\\033[31m') \\"Previous command FAILED\\" + echo $(printf '\\033[31m') "Previous command FAILED" ((n++)) - echo $(printf '\\\\033[34m') \\"RETRYING...\\" + echo $(printf '\\033[34m') "RETRYING..." sleep 1 fi done } -retry \\"$*\\" +retry "$*" " `; @@ -478,12 +478,12 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper "#!/usr/bin/env bash # The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" +echo "Executing post-generate hook" " `; exports[`samples/fablo-config-hlf2-1org-1chaincode-k8s.json should create proper files from samples/fablo-config-hlf2-1org-1chaincode-k8s.json 1`] = ` -Array [ +[ "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-k8s.json.tmpdir/fablo-target/fabric-config/.gitignore", "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-k8s.json.tmpdir/fablo-target/fabric-k8s.sh", "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-k8s.json.tmpdir/fablo-target/fabric-k8s/.env", diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index c5a630c2..ff301af3 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -25,13 +25,13 @@ Channel: &ChannelDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Capabilities: <<: *ChannelCapabilities @@ -47,16 +47,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Writers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Admins: Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" + Rule: "OR('OrdererMSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" AnchorPeers: @@ -68,16 +68,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" + Rule: "OR('Org1MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" AnchorPeers: - Host: peer0.org1.example.com @@ -94,16 +94,16 @@ Application: &ApplicationDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" + Rule: "MAJORITY Endorsement" Capabilities: <<: *ApplicationCapabilities @@ -133,18 +133,18 @@ Orderer: &Group1Defaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" # BlockValidation specifies what signatures must be included in the block # from the orderer for the peer to validate it. BlockValidation: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Capabilities: <<: *OrdererCapabilities @@ -192,43 +192,43 @@ Profiles: exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" + "name": "fablo-test-network-orderer", + "description": "Connection profile for Orderer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer" }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\" + "organizations": { + "Orderer": { + "mspid": "OrdererMSP", + "peers": [ + "peer0.org1.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" + "certificateAuthorities": [ + "ca.orderer.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"https://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.orderer.example.com": { + "url": "https://localhost:7020", + "caName": "ca.orderer.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -271,43 +271,43 @@ certificateAuthorities: exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Org1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1" }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" + "certificateAuthorities": [ + "ca.org1.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"https://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.org1.example.com": { + "url": "https://localhost:7040", + "caName": "ca.org1.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -375,77 +375,77 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/explorer/config-org1.json from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/explorer/connection-profile-org1.json from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Hyperledger Explorer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\", - \\"tlsEnable\\": true, - \\"enableAuthentication\\": true, - \\"adminCredential\\": { - \\"id\\": \\"admin\\", - \\"password\\": \\"adminpw\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Hyperledger Explorer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1", + "tlsEnable": true, + "enableAuthentication": true, + "adminCredential": { + "id": "admin", + "password": "adminpw" }, - \\"connection\\": { - \\"timeout\\": { - \\"peer\\": { - \\"endorser\\": \\"300\\" + "connection": { + "timeout": { + "peer": { + "endorser": "300" }, - \\"orderer\\": \\"300\\" + "orderer": "300" } } }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"adminPrivateKey\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv-key.pem\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "adminPrivateKey": { + "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv-key.pem" }, - \\"peers\\": [ - \\"peer0.org1.example.com\\" + "peers": [ + "peer0.org1.example.com" ], - \\"signedCert\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem\\" + "signedCert": { + "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem" } } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://peer0.org1.example.com:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://peer0.org1.example.com:7041", + "tlsCACerts": { + "path": "/tmp/crypto/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem" } } }, - \\"channels\\": { - \\"my-channel1\\": { - \\"peers\\": {} + "channels": { + "my-channel1": { + "peers": {} } } } @@ -466,14 +466,14 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -481,9 +481,9 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -501,7 +501,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -568,11 +568,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -584,25 +584,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -623,7 +623,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -642,11 +642,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -658,7 +658,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -666,9 +666,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -700,18 +700,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -740,7 +740,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -761,7 +761,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -817,7 +817,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -845,12 +845,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -967,14 +967,14 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -982,9 +982,9 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1002,7 +1002,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1069,11 +1069,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1085,25 +1085,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1124,7 +1124,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1143,11 +1143,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1159,7 +1159,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1167,9 +1167,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1201,18 +1201,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1241,7 +1241,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1262,7 +1262,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1318,7 +1318,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1346,12 +1346,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1459,16 +1459,16 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre set -eu -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/.env" +source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" networkUp() { generateArtifacts @@ -1480,45 +1480,45 @@ networkUp() { printStartSuccessInfo } -if [ \\"$1\\" = \\"up\\" ]; then +if [ "$1" = "up" ]; then networkUp -elif [ \\"$1\\" = \\"down\\" ]; then +elif [ "$1" = "down" ]; then networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then +elif [ "$1" = "reset" ]; then networkDown networkUp -elif [ \\"$1\\" = \\"start\\" ]; then +elif [ "$1" = "start" ]; then startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then +elif [ "$1" = "stop" ]; then stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then + chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then +elif [ "$1" = "--help" ]; then printHelp else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" fi " `; @@ -1563,17 +1563,17 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre "#!/usr/bin/env bash chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + elif [ "$1" = "peer0.org1.example.com" ]; then - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name else - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" exit 1 fi @@ -1586,33 +1586,33 @@ chaincodeList() { # 4. chaincode command # 5. transient data (optional) chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" exit 1 fi - cli=\\"\\" - peer_addresses=\\"\\" + cli="" + peer_addresses="" - peer_certs=\\"\\" + peer_certs="" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + if [[ "$1" == *"peer0.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer0.org1.example.com:7041" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt" fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" exit 1 fi - if [ \\"$2\\" = \\"my-channel1\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + if [ "$2" = "my-channel1" ]; then + ca_cert="crypto-orderer/tlsca.orderer.example.com-cert.pem" fi - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" + peerChaincodeInvokeTls "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" "\${peer_certs:1}" "$ca_cert" } " @@ -1621,64 +1621,64 @@ chaincodeInvoke() { exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "#!/usr/bin/env bash -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" set -eu channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" + echo "-> Channel query: " + "$@" - if [ \\"$#\\" -eq 1 ]; then + if [ "$#" -eq 1 ]; then printChannelsHelp - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - peerChannelListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" else - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + echo "$@" + echo "$1, $2, $3, $4, $5, $6, $7, $#" printChannelsHelp fi } printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" + echo "Channel management commands:" + echo "" - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" + echo "fablo channel list org1 peer0" + echo -e "\\t List channels on 'peer0' of 'Org1'". + echo "" - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" + echo "fablo channel getinfo my-channel1 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" } " @@ -1688,173 +1688,173 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre "#!/usr/bin/env bash generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" + printHeadline "Generating basic configs" "U1F913" - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Orderer" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + printItalics "Generating genesis block for group group1" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" } startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + printHeadline "Starting network" "U1F680" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) sleep 4 } generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Generating config for 'my-channel1'" "U1F913" + createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" } installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" } installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - local version=\\"0.0.1\\" - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"12\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"peer0.org1.example.com:7041\\" \\"crypto-peer/peer0.org1.example.com/tls/ca.crt\\" \\"\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + local version="0.0.1" + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "12" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "peer0.org1.example.com:7041" "crypto-peer/peer0.org1.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi } installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"12\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"peer0.org1.example.com:7041\\" \\"crypto-peer/peer0.org1.example.com/tls/ca.crt\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "12" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "peer0.org1.example.com:7041" "crypto-peer/peer0.org1.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi fi } runDevModeChaincode() { local chaincodeName=$1 - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - local version=\\"0.0.1\\" - printHeadline \\"Approving 'chaincode1' for Org1 (dev mode)\\" \\"U1F60E\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1' (dev mode)\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"peer0.org1.example.com:7041\\" \\"\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + local version="0.0.1" + printHeadline "Approving 'chaincode1' for Org1 (dev mode)" "U1F60E" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "orderer0.group1.orderer.example.com:7030" "" "false" "" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1' (dev mode)" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "orderer0.group1.orderer.example.com:7030" "" "false" "" "peer0.org1.example.com:7041" "" "" fi } upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"12\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"peer0.org1.example.com:7041\\" \\"crypto-peer/peer0.org1.example.com/tls/ca.crt\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "12" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "peer0.org1.example.com:7041" "crypto-peer/peer0.org1.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi fi } notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Creating new channel config blocks" "U1F537" + createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline "Notyfing orgs about channels" "U1F4E2" + notifyOrgAboutNewChannelTls "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" + printHeadline "Deleting new channel config blocks" "U1F52A" + deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" } printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" + printHeadline "Done! Enjoy your fresh network" "U1F984" } stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + printHeadline "Stopping network" "U1F68F" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) sleep 4 } networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + printHeadline "Destroying network" "U1F916" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + printf "Removing chaincode containers & images... \\U1F5D1 \\n" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + printf "Removing generated configs... \\U1F5D1 \\n" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" + printHeadline "Done! Network was purged" "U1F5D1" } " `; @@ -1916,7 +1916,7 @@ services: - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -1989,7 +1989,7 @@ services: - POSTGRES_USER=postgres - POSTGRES_DB=fabriccaserver healthcheck: - test: \\"pg_isready -h localhost -p 5432 -q -U postgres\\" + test: "pg_isready -h localhost -p 5432 -q -U postgres" interval: 5s timeout: 10s retries: 7 @@ -2028,7 +2028,7 @@ services: - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -2044,7 +2044,7 @@ services: - DISCOVERY_URLS=grpcs://peer0.org1.example.com:7041 - DISCOVERY_SSL_TARGET_NAME_OVERRIDES= - DISCOVERY_TLS_CA_CERT_FILES=/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - - HFC_LOGGING={\\"error\\":\\"console\\",\\"warn\\":\\"console\\",\\"info\\":\\"console\\"} + - HFC_LOGGING={"error":"console","warn":"console","info":"console"} volumes: # note: fablo needs access to all anchor peer certs - ../fabric-config/crypto-config/peerOrganizations:/crypto:ro @@ -2114,7 +2114,7 @@ services: - COUCHDB_USER=peer0 - COUCHDB_PASSWORD=peer0Password healthcheck: - test: \\"curl -f http://localhost:5984/\\" + test: "curl -f http://localhost:5984/" interval: 5s timeout: 10s retries: 7 @@ -2131,7 +2131,7 @@ services: - DATABASE_USERNAME=hppoc - DATABASE_PASSWORD=password healthcheck: - test: \\"pg_isready -h localhost -p 5432 -q -U postgres\\" + test: "pg_isready -h localhost -p 5432 -q -U postgres" interval: 5s timeout: 10s retries: 7 @@ -2159,7 +2159,7 @@ services: - ../fabric-config/explorer:/opt/explorer/app/platform/fabric/connection-profile - ../fabric-config/crypto-config:/tmp/crypto ports: - - \\"7010:8080\\" + - "7010:8080" depends_on: db.explorer.example.com: condition: service_healthy @@ -2180,32 +2180,32 @@ certsGenerate() { local OUTPUT_PATH=$4 local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + echo "Generating certs..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" + inputLog "ORG_PATH: $ORG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -d "$FULL_CERT_PATH" ]; then + echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do + dir=$(dirname "$file") + mv "\${dir}"/*_sk "\${dir}"/priv-key.pem done } @@ -2217,26 +2217,26 @@ genesisBlockCreate() { local GENESIS_PROFILE_NAME=$3 local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + echo "Creating genesis block..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" + inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then + echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + mkdir -p "$OUTPUT_PATH" + docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2248,27 +2248,27 @@ createChannelTx() { local CONFIG_PATH=$2 local CONFIG_PROFILE=$3 local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + echo "Creating channelTx for $CHANNEL_NAME..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$CHANNEL_TX_PATH" ]; then + echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2281,34 +2281,34 @@ createNewChannelUpdateTx() { local CONFIG_PROFILE=$3 local CONFIG_PATH=$4 local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then + echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\ + --configPath ./fabric-config \\ + -profile "\${CONFIG_PROFILE}" \\ + -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ + -channelID "\${CHANNEL_NAME}" \\ + -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2319,24 +2319,24 @@ notifyOrgAboutNewChannel() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -2346,26 +2346,26 @@ notifyOrgAboutNewChannelTls() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + local CA_CERT="/var/hyperledger/cli/"\${6} + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" \\ + --tls --cafile "$CA_CERT" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -2373,58 +2373,58 @@ deleteNewChannelUpdateTx() { local CHANNEL_NAME=$1 local MSP_NAME=$2 local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" + inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' + bold=$'\\e[1m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' + italics=$'\\e[3m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } certsRemove() { local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" + rm -rf "$CERTS_DIR_PATH" } removeContainer() { CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" + docker rm -f "$CONTAINER_NAME" } " `; @@ -2433,46 +2433,46 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre "#!/usr/bin/env bash printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-docker.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-docker.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-docker.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-docker.sh start" + echo -e "\\t Starts already created network." + echo "" + echo "./fabric-docker.sh stop" + echo -e "\\t Stops already running network." + echo "" + echo "./fabric-docker.sh reset" + echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." + echo "" + echo "./fabric-docker.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" } " `; exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. # see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" + local IMAGE="$1" + if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then + docker pull --platform linux/x86_64 "$IMAGE" fi } @@ -2482,61 +2482,61 @@ chaincodeBuild() { local CHAINCODE_DIR_PATH=$3 local RECOMMENDED_NODE_VERSION=$4 - mkdir -p \\"$CHAINCODE_DIR_PATH\\" + mkdir -p "$CHAINCODE_DIR_PATH" # pull required images upfront in case of arm64 (Apple Silicon) architecture # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + if [ "$(uname -m)" = "arm64" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + if [ "$CHAINCODE_LANG" = "java" ]; then + dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + if [ "$CHAINCODE_LANG" = "golang" ]; then + dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) set +e source ~/.nvm/nvm.sh set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" + if [ "$(command -v nvm)" == "nvm" ]; then + current_dir="$(pwd)" + cd "$CHAINCODE_DIR_PATH" set +u nvm install set -u - cd \\"$current_dir\\" + cd "$current_dir" fi fi - NODE_VERSION=\\"$(node --version)\\" + NODE_VERSION="$(node --version)" - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" + USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" + if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then + RECOMMENDED_NODE_VERSION="8.9" fi - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then + echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" + echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) + if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then + (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build && npm install --production) fi fi } @@ -2546,23 +2546,23 @@ chaincodePackage() { local PEER_ADDRESS=$2 local CHAINCODE_NAME=$3 local CHAINCODE_VERSION=$4 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local CHAINCODE_LANG=$5 - echo \\"Packaging chaincode $CHAINCODE_NAME...\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" + echo "Packaging chaincode $CHAINCODE_NAME..." + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CLI_NAME: $CLI_NAME" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode package \\\\ - \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" \\\\ - --path \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - --lang \\"$CHAINCODE_LANG\\" \\\\ - --label \\"$CHAINCODE_LABEL\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode package \\ + "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" \\ + --path "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ + --lang "$CHAINCODE_LANG" \\ + --label "$CHAINCODE_LABEL" # set package owner as current (host) user to fix permission issues - docker exec \\"$CLI_NAME\\" chown \\"$(id -u):$(id -g)\\" \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" + docker exec "$CLI_NAME" chown "$(id -u):$(id -g)" "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" } chaincodeInstall() { @@ -2570,113 +2570,113 @@ chaincodeInstall() { local PEER_ADDRESS=$2 local CHAINCODE_NAME=$3 local CHAINCODE_VERSION=$4 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local CA_CERT=$5 - echo \\"Installing chaincode $CHAINCODE_NAME...\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Installing chaincode $CHAINCODE_NAME..." + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tlsRootCertFiles \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tlsRootCertFiles "/var/hyperledger/cli/$CA_CERT") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode install \\\\ - \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode install \\ + "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeApprove() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - local CHANNEL_NAME=\\"$3\\" + local CHANNEL_NAME="$3" local CHAINCODE_NAME=$4 local CHAINCODE_VERSION=$5 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local ORDERER_URL=$6 local ENDORSEMENT=$7 local INIT_REQUIRED=$8 local CA_CERT=$9 local COLLECTIONS_CONFIG=\${10} - echo \\"Approving chaincode $CHAINCODE_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"INIT_REQUIRED: $INIT_REQUIRED\\" - inputLog \\"CA_CERT: $CA_CERT\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + echo "Approving chaincode $CHAINCODE_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "INIT_REQUIRED: $INIT_REQUIRED" + inputLog "CA_CERT: $CA_CERT" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local ENDORSEMENT_PARAMS=() - if [ -n \\"$ENDORSEMENT\\" ]; then - ENDORSEMENT_PARAMS=(--signature-policy \\"$ENDORSEMENT\\") + if [ -n "$ENDORSEMENT" ]; then + ENDORSEMENT_PARAMS=(--signature-policy "$ENDORSEMENT") fi local INIT_REQUIRED_PARAMS=() - if [ \\"$INIT_REQUIRED\\" = \\"true\\" ]; then + if [ "$INIT_REQUIRED" = "true" ]; then INIT_REQUIRED_PARAMS=(--init-required) fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi local QUERYINSTALLED_RESPONSE local CC_PACKAGE_ID - QUERYINSTALLED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode queryinstalled \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - CC_PACKAGE_ID=\\"$(jq \\".installed_chaincodes | [.[]? | select(.label==\\\\\\"$CHAINCODE_LABEL\\\\\\") ][0].package_id // \\\\\\"\\\\\\"\\" -r <<<\\"$QUERYINSTALLED_RESPONSE\\")\\" - if [ -z \\"$CC_PACKAGE_ID\\" ]; then - CC_PACKAGE_ID=\\"$CHAINCODE_NAME:$CHAINCODE_VERSION\\" + QUERYINSTALLED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode queryinstalled \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + CC_PACKAGE_ID="$(jq ".installed_chaincodes | [.[]? | select(.label==\\"$CHAINCODE_LABEL\\") ][0].package_id // \\"\\"" -r <<<"$QUERYINSTALLED_RESPONSE")" + if [ -z "$CC_PACKAGE_ID" ]; then + CC_PACKAGE_ID="$CHAINCODE_NAME:$CHAINCODE_VERSION" fi - inputLog \\"CC_PACKAGE_ID: $CC_PACKAGE_ID\\" + inputLog "CC_PACKAGE_ID: $CC_PACKAGE_ID" local QUERYCOMMITTED_RESPONSE local SEQUENCE - QUERYCOMMITTED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - SEQUENCE=\\"$(jq \\".chaincode_definitions | [.[]? | select(.name==\\\\\\"$CHAINCODE_NAME\\\\\\").sequence ] | max | select(.!= null)\\" -r <<<\\"$QUERYCOMMITTED_RESPONSE\\")\\" + QUERYCOMMITTED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + SEQUENCE="$(jq ".chaincode_definitions | [.[]? | select(.name==\\"$CHAINCODE_NAME\\").sequence ] | max | select(.!= null)" -r <<<"$QUERYCOMMITTED_RESPONSE")" SEQUENCE=$((SEQUENCE + 1)) - inputLog \\"SEQUENCE: $SEQUENCE\\" + inputLog "SEQUENCE: $SEQUENCE" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CC_PACKAGE_ID=\\"$CC_PACKAGE_ID\\" \\"$CLI_NAME\\" peer lifecycle chaincode approveformyorg \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - --package-id \\"$CC_PACKAGE_ID\\" \\\\ - --sequence \\"$SEQUENCE\\" \\\\ - \\"\${ENDORSEMENT_PARAMS[@]+\\"\${ENDORSEMENT_PARAMS[@]}\\"}\\" \\\\ - \\"\${INIT_REQUIRED_PARAMS[@]+\\"\${INIT_REQUIRED_PARAMS[@]}\\"}\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CC_PACKAGE_ID="$CC_PACKAGE_ID" "$CLI_NAME" peer lifecycle chaincode approveformyorg \\ + -o "$ORDERER_URL" \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + --package-id "$CC_PACKAGE_ID" \\ + --sequence "$SEQUENCE" \\ + "\${ENDORSEMENT_PARAMS[@]+"\${ENDORSEMENT_PARAMS[@]}"}" \\ + "\${INIT_REQUIRED_PARAMS[@]+"\${INIT_REQUIRED_PARAMS[@]}"}" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeCommit() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - local CHANNEL_NAME=\\"$3\\" + local CHANNEL_NAME="$3" local CHAINCODE_NAME=$4 local CHAINCODE_VERSION=$5 local ORDERER_URL=$6 @@ -2687,77 +2687,77 @@ chaincodeCommit() { local TLS_ROOT_CERT_FILES=\${11} local COLLECTIONS_CONFIG=\${12} - echo \\"Committing chaincode $CHAINCODE_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"INIT_REQUIRED: $INIT_REQUIRED\\" - inputLog \\"CA_CERT: $CA_CERT\\" - inputLog \\"COMMIT_PEER_ADDRESSES: $COMMIT_PEER_ADDRESSES\\" - inputLog \\"TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + echo "Committing chaincode $CHAINCODE_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "INIT_REQUIRED: $INIT_REQUIRED" + inputLog "CA_CERT: $CA_CERT" + inputLog "COMMIT_PEER_ADDRESSES: $COMMIT_PEER_ADDRESSES" + inputLog "TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COMMIT_PEER_PARAMS=() - if [ -n \\"$COMMIT_PEER_ADDRESSES\\" ]; then + if [ -n "$COMMIT_PEER_ADDRESSES" ]; then # shellcheck disable=SC2207 - COMMIT_PEER_PARAMS=($(echo \\",$COMMIT_PEER_ADDRESSES\\" | sed 's/,/ --peerAddresses /g')) + COMMIT_PEER_PARAMS=($(echo ",$COMMIT_PEER_ADDRESSES" | sed 's/,/ --peerAddresses /g')) fi local TLS_ROOT_CERT_PARAMS=() - if [ -n \\"$TLS_ROOT_CERT_FILES\\" ]; then + if [ -n "$TLS_ROOT_CERT_FILES" ]; then # shellcheck disable=SC2207 - TLS_ROOT_CERT_PARAMS=(--tls $(echo \\",$TLS_ROOT_CERT_FILES\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')) + TLS_ROOT_CERT_PARAMS=(--tls $(echo ",$TLS_ROOT_CERT_FILES" | sed 's/,/ --tlsRootCertFiles \\/var\\/hyperledger\\/cli\\//g')) fi local ENDORSEMENT_PARAMS=() - if [ -n \\"$ENDORSEMENT\\" ]; then - ENDORSEMENT_PARAMS=(--signature-policy \\"$ENDORSEMENT\\") + if [ -n "$ENDORSEMENT" ]; then + ENDORSEMENT_PARAMS=(--signature-policy "$ENDORSEMENT") fi local INIT_REQUIRED_PARAMS=() - if [ \\"$INIT_REQUIRED\\" = \\"true\\" ]; then + if [ "$INIT_REQUIRED" = "true" ]; then INIT_REQUIRED_PARAMS=(--init-required) fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi local QUERYCOMMITTED_RESPONSE local SEQUENCE - QUERYCOMMITTED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - SEQUENCE=\\"$(jq \\".chaincode_definitions | [.[]? | select(.name==\\\\\\"$CHAINCODE_NAME\\\\\\").sequence ] | max | select(.!= null)\\" -r <<<\\"$QUERYCOMMITTED_RESPONSE\\")\\" + QUERYCOMMITTED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + SEQUENCE="$(jq ".chaincode_definitions | [.[]? | select(.name==\\"$CHAINCODE_NAME\\").sequence ] | max | select(.!= null)" -r <<<"$QUERYCOMMITTED_RESPONSE")" SEQUENCE=$((SEQUENCE + 1)) - inputLog \\"SEQUENCE: $SEQUENCE\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode commit \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - --sequence \\"$SEQUENCE\\" \\\\ - \\"\${ENDORSEMENT_PARAMS[@]+\\"\${ENDORSEMENT_PARAMS[@]}\\"}\\" \\\\ - \\"\${INIT_REQUIRED_PARAMS[@]+\\"\${INIT_REQUIRED_PARAMS[@]}\\"}\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${COMMIT_PEER_PARAMS[@]+\\"\${COMMIT_PEER_PARAMS[@]}\\"}\\" \\\\ - \\"\${TLS_ROOT_CERT_PARAMS[@]+\\"\${TLS_ROOT_CERT_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + inputLog "SEQUENCE: $SEQUENCE" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode commit \\ + -o "$ORDERER_URL" \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + --sequence "$SEQUENCE" \\ + "\${ENDORSEMENT_PARAMS[@]+"\${ENDORSEMENT_PARAMS[@]}"}" \\ + "\${INIT_REQUIRED_PARAMS[@]+"\${INIT_REQUIRED_PARAMS[@]}"}" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${COMMIT_PEER_PARAMS[@]+"\${COMMIT_PEER_PARAMS[@]}"}" \\ + "\${TLS_ROOT_CERT_PARAMS[@]+"\${TLS_ROOT_CERT_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } peerChaincodeList() { @@ -2765,13 +2765,13 @@ peerChaincodeList() { local PEER_ADDRESS=$2 local CHANNEL_NAME=$3 - echo \\"Chaincodes list:\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" # Execute the command to list chaincodes - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" } peerChaincodeListTls() { @@ -2780,84 +2780,84 @@ peerChaincodeListTls() { local CHANNEL_NAME=$3 local CA_CERT=$4 - echo \\"Chaincodes list:\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CA_CERT: $CA_CERT" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --tls \\\\ - --cafile \\"/var/hyperledger/cli/$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --tls \\ + --cafile "/var/hyperledger/cli/$CA_CERT" } # Function to perform chaincode invoke peerChaincodeInvoke() { - local CLI=\\"$1\\" - local PEERS=\\"$2\\" - local CHANNEL=\\"$3\\" - local CHAINCODE=\\"$4\\" - local COMMAND=\\"$5\\" - local TRANSIENT=\\"$6\\" - - echo \\"Chaincode invoke:\\" - inputLog \\"CLI: $CLI\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ + docker exec "$CLI" peer chaincode invoke \\ + $PEER_ADDRESSES \\ + -C "$CHANNEL" \\ + -n "$CHAINCODE" \\ + -c "$COMMAND" \\ + --transient "$TRANSIENT" \\ + --waitForEvent \\ + --waitForEventTimeout 90s \\ 2>&1 } # Function to perform chaincode invoke for Tls peerChaincodeInvokeTls() { - local CLI=\\"$1\\" - local PEERS=\\"$2\\" - local CHANNEL=\\"$3\\" - local CHAINCODE=\\"$4\\" - local COMMAND=\\"$5\\" - local TRANSIENT=\\"$6\\" - local PEER_CERTS=\\"$7\\" - local CA_CERT=\\"$8\\" - - echo \\"Chaincode invoke:\\" - inputLog \\"CLI: $CLI\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - inputLog \\"PEER_CERTS: $PEER_CERTS\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - TLS_ROOT_CERT_FILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEER_CERTS\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')\\" + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + local PEER_CERTS="$7" + local CA_CERT="$8" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + inputLog "PEER_CERTS: $PEER_CERTS" + inputLog "CA_CERT: $CA_CERT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" + + TLS_ROOT_CERT_FILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$PEER_CERTS" | sed 's/,/ --tlsRootCertFiles \\/var\\/hyperledger\\/cli\\//g')" # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - $TLS_ROOT_CERT_FILES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - --tls \\\\ - --cafile \\"/var/hyperledger/cli/$CA_CERT\\" \\\\ + docker exec "$CLI" peer chaincode invoke \\ + $PEER_ADDRESSES \\ + $TLS_ROOT_CERT_FILES \\ + -C "$CHANNEL" \\ + -n "$CHAINCODE" \\ + -c "$COMMAND" \\ + --transient "$TRANSIENT" \\ + --waitForEvent \\ + --waitForEventTimeout 90s \\ + --tls \\ + --cafile "/var/hyperledger/cli/$CA_CERT" \\ 2>&1 } " @@ -2870,11 +2870,11 @@ peerChannelList() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list } peerChannelGetInfo() { @@ -2882,13 +2882,13 @@ peerChannelGetInfo() { local CLI_NAME=$2 local PEER_ADDRESS=$3 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" } peerChannelFetchConfig() { @@ -2897,53 +2897,53 @@ peerChannelFetchConfig() { local CONFIG_FILE_NAME=$3 local PEER_ADDRESS=$4 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local TARGET_FILE="$5" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } #=== TLS equivalents ========================================================= @@ -2953,11 +2953,11 @@ peerChannelListTls() { local PEER_ADDRESS=$2 local CA_CERT=$3 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" } peerChannelGetInfoTls() { @@ -2966,13 +2966,13 @@ peerChannelGetInfoTls() { local PEER_ADDRESS=$3 local CA_CERT=$4 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" } peerChannelFetchConfigTls() { @@ -2982,54 +2982,54 @@ peerChannelFetchConfigTls() { local PEER_ADDRESS=$4 local CA_CERT=$5 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local CA_CERT="$5" + local TARGET_FILE="$6" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } " `; @@ -3044,26 +3044,26 @@ createChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Creating channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx + peer channel join -b "\${CHANNEL_NAME}".block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } createChannelAndJoinTls() { @@ -3071,9 +3071,9 @@ createChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -3082,24 +3082,24 @@ createChannelAndJoinTls() { local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Creating channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoin() { @@ -3107,24 +3107,24 @@ fetchChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Fetching channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" + peer channel join -b "\${CHANNEL_NAME}"_newest.block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoinTls() { @@ -3132,9 +3132,9 @@ fetchChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -3143,22 +3143,22 @@ fetchChannelAndJoinTls() { local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } " `; @@ -3167,107 +3167,107 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre "#!/usr/bin/env bash __getOrdererAndPeerNodes() { - echo \\" + echo " orderer0.group1.orderer.example.com peer0.org1.example.com - \\" + " } __getCASQLiteNodes() { - echo \\" + echo " ca.orderer.example.com - \\" + " } __getCAPostgresNodes() { - echo \\" + echo " db.ca.org1.example.com - \\" + " } __createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + cd "$FABLO_NETWORK_ROOT/.." + backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then + echo "Error: Directory '$backup_dir' already exists and is not empty!" exit 1 fi - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" + mkdir -p "$backup_dir" + cp -R ./fablo-target "$backup_dir/" for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node" + docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" done for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node/pg-data" + docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" done for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + echo "Saving state of $node..." + docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" done } __cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" + cd "$FABLO_NETWORK_ROOT/.." + target_dir="$1" + hook_cmd="$2" - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + if [ -d "$target_dir/fablo-target" ]; then + echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." exit 1 fi - cp -R ./fablo-target \\"$target_dir/fablo-target\\" + cp -R ./fablo-target "$target_dir/fablo-target" - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + if [ -n "$hook_cmd" ]; then + echo "Executing pre-restore hook: '$hook_cmd'" + (cd "$target_dir" && eval "$hook_cmd") fi - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" fi done for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" fi done for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + docker cp "./$node/" "$node:/var/hyperledger/production/" fi done } createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") + (set -eu && __createSnapshot "$1") } cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") + (set -eu && __cloneSnapshot "$1" "$2") } " `; @@ -3276,14 +3276,14 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre "#!/usr/bin/env bash # The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" +echo "Executing post-generate hook" -perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' \\"./fablo-target/fabric-config/configtx.yaml\\" +perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' "./fablo-target/fabric-config/configtx.yaml" " `; exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper files from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` -Array [ +[ "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/.gitignore", "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/configtx.yaml", "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index c8e5fa41..55160a19 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -25,13 +25,13 @@ Channel: &ChannelDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Capabilities: <<: *ChannelCapabilities @@ -47,16 +47,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Writers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Admins: Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" + Rule: "OR('OrdererMSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" AnchorPeers: @@ -68,16 +68,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" + Rule: "OR('Org1MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" AnchorPeers: - Host: peer0.org1.example.com @@ -97,16 +97,16 @@ Application: &ApplicationDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" + Rule: "MAJORITY Endorsement" Capabilities: <<: *ApplicationCapabilities @@ -129,18 +129,18 @@ Orderer: &Group1Defaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" # BlockValidation specifies what signatures must be included in the block # from the orderer for the peer to validate it. BlockValidation: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Capabilities: <<: *OrdererCapabilities @@ -188,38 +188,38 @@ Profiles: exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" + "name": "fablo-test-network-orderer", + "description": "Connection profile for Orderer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer" }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\" + "organizations": { + "Orderer": { + "mspid": "OrdererMSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" + "certificateAuthorities": [ + "ca.orderer.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" } }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.orderer.example.com": { + "url": "http://localhost:7020", + "caName": "ca.orderer.example.com", + "httpOptions": { + "verify": false } } } @@ -257,38 +257,38 @@ certificateAuthorities: exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Org1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1" }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" + "certificateAuthorities": [ + "ca.org1.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" } }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false + "certificateAuthorities": { + "ca.org1.example.com": { + "url": "http://localhost:7040", + "caName": "ca.org1.example.com", + "httpOptions": { + "verify": false } } } @@ -351,13 +351,13 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; @@ -376,14 +376,14 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -391,9 +391,9 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -411,7 +411,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -478,11 +478,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -494,25 +494,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -533,7 +533,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -552,11 +552,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -568,7 +568,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -576,9 +576,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -610,18 +610,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -650,7 +650,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -671,7 +671,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -727,7 +727,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -755,12 +755,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -877,14 +877,14 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -892,9 +892,9 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -912,7 +912,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -979,11 +979,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -995,25 +995,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1034,7 +1034,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1053,11 +1053,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1069,7 +1069,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1077,9 +1077,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1111,18 +1111,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1151,7 +1151,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1172,7 +1172,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1228,7 +1228,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1256,12 +1256,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1369,16 +1369,16 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e set -eu -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/.env" +source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" networkUp() { generateArtifacts @@ -1390,45 +1390,45 @@ networkUp() { printStartSuccessInfo } -if [ \\"$1\\" = \\"up\\" ]; then +if [ "$1" = "up" ]; then networkUp -elif [ \\"$1\\" = \\"down\\" ]; then +elif [ "$1" = "down" ]; then networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then +elif [ "$1" = "reset" ]; then networkDown networkUp -elif [ \\"$1\\" = \\"start\\" ]; then +elif [ "$1" = "start" ]; then startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then +elif [ "$1" = "stop" ]; then stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then + chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then +elif [ "$1" = "--help" ]; then printHelp else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" fi " `; @@ -1473,23 +1473,23 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e "#!/usr/bin/env bash chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + elif [ "$1" = "peer0.org1.example.com" ]; then - peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" # $2 is channel name elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + [ "$1" = "peer1.org1.example.com" ] then - peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + peerChaincodeList "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" # $2 is channel name else - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" exit 1 fi @@ -1502,30 +1502,30 @@ chaincodeList() { # 4. chaincode command # 5. transient data (optional) chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" exit 1 fi - cli=\\"\\" - peer_addresses=\\"\\" + cli="" + peer_addresses="" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + if [[ "$1" == *"peer0.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer0.org1.example.com:7041" fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + if [[ "$1" == *"peer1.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer1.org1.example.com:7042" fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" exit 1 fi - peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + peerChaincodeInvoke "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" } " @@ -1534,101 +1534,101 @@ chaincodeInvoke() { exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` "#!/usr/bin/env bash -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" set -eu channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" + echo "-> Channel query: " + "$@" - if [ \\"$#\\" -eq 1 ]; then + if [ "$#" -eq 1 ]; then printChannelsHelp - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - peerChannelList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + peerChannelList "cli.org1.example.com" "peer0.org1.example.com:7041" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] then - peerChannelList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + peerChannelList "cli.org1.example.com" "peer1.org1.example.com:7042" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" + peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] then - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer1.org1.example.com:7042" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" + peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"$TARGET_FILE\\" + peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "$TARGET_FILE" else - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + echo "$@" + echo "$1, $2, $3, $4, $5, $6, $7, $#" printChannelsHelp fi } printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" + echo "Channel management commands:" + echo "" + + echo "fablo channel list org1 peer0" + echo -e "\\t List channels on 'peer0' of 'Org1'". + echo "" + + echo "fablo channel list org1 peer1" + echo -e "\\t List channels on 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" } " @@ -1638,186 +1638,186 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e "#!/usr/bin/env bash generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" + printHeadline "Generating basic configs" "U1F913" - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Orderer" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + printItalics "Generating genesis block for group group1" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" } startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + printHeadline "Starting network" "U1F680" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) sleep 4 } generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Generating config for 'my-channel1'" "U1F913" + createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" } installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" } installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - local version=\\"0.0.1\\" - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"16\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"chaincode1\\" \\"$version\\" \\"\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"peer0.org1.example.com:7041\\" \\"\\" \\"\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + local version="0.0.1" + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "chaincode1" "$version" "" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "" "peer0.org1.example.com:7041" "" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi } installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"16\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"chaincode1\\" \\"$version\\" \\"\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"peer0.org1.example.com:7041\\" \\"\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "chaincode1" "$version" "" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "" "peer0.org1.example.com:7041" "" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi fi } runDevModeChaincode() { local chaincodeName=$1 - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - local version=\\"0.0.1\\" - printHeadline \\"Approving 'chaincode1' for Org1 (dev mode)\\" \\"U1F60E\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1' (dev mode)\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"peer0.org1.example.com:7041\\" \\"\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + local version="0.0.1" + printHeadline "Approving 'chaincode1' for Org1 (dev mode)" "U1F60E" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "orderer0.group1.orderer.example.com:7030" "" "false" "" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1' (dev mode)" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "orderer0.group1.orderer.example.com:7030" "" "false" "" "peer0.org1.example.com:7041" "" "" fi } upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"16\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"chaincode1\\" \\"$version\\" \\"\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"peer0.org1.example.com:7041\\" \\"\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "chaincode1" "$version" "" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "" "peer0.org1.example.com:7041" "" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi fi } notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Creating new channel config blocks" "U1F537" + createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + printHeadline "Notyfing orgs about channels" "U1F4E2" + notifyOrgAboutNewChannel "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" + printHeadline "Deleting new channel config blocks" "U1F52A" + deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" } printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" + printHeadline "Done! Enjoy your fresh network" "U1F984" } stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + printHeadline "Stopping network" "U1F68F" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) sleep 4 } networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + printHeadline "Destroying network" "U1F916" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + printf "Removing chaincode containers & images... \\U1F5D1 \\n" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer1.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer1.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer1.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + printf "Removing generated configs... \\U1F5D1 \\n" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" + printHeadline "Done! Network was purged" "U1F5D1" } " `; @@ -1870,7 +1870,7 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -1939,7 +1939,7 @@ services: - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -1953,7 +1953,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -1996,7 +1996,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -2044,32 +2044,32 @@ certsGenerate() { local OUTPUT_PATH=$4 local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + echo "Generating certs..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" + inputLog "ORG_PATH: $ORG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -d "$FULL_CERT_PATH" ]; then + echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do + dir=$(dirname "$file") + mv "\${dir}"/*_sk "\${dir}"/priv-key.pem done } @@ -2081,26 +2081,26 @@ genesisBlockCreate() { local GENESIS_PROFILE_NAME=$3 local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + echo "Creating genesis block..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" + inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then + echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + mkdir -p "$OUTPUT_PATH" + docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2112,27 +2112,27 @@ createChannelTx() { local CONFIG_PATH=$2 local CONFIG_PROFILE=$3 local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + echo "Creating channelTx for $CHANNEL_NAME..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$CHANNEL_TX_PATH" ]; then + echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2145,34 +2145,34 @@ createNewChannelUpdateTx() { local CONFIG_PROFILE=$3 local CONFIG_PATH=$4 local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then + echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\ + --configPath ./fabric-config \\ + -profile "\${CONFIG_PROFILE}" \\ + -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ + -channelID "\${CHANNEL_NAME}" \\ + -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -2183,24 +2183,24 @@ notifyOrgAboutNewChannel() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -2210,26 +2210,26 @@ notifyOrgAboutNewChannelTls() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + local CA_CERT="/var/hyperledger/cli/"\${6} + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" \\ + --tls --cafile "$CA_CERT" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -2237,58 +2237,58 @@ deleteNewChannelUpdateTx() { local CHANNEL_NAME=$1 local MSP_NAME=$2 local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" + inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' + bold=$'\\e[1m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' + italics=$'\\e[3m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } certsRemove() { local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" + rm -rf "$CERTS_DIR_PATH" } removeContainer() { CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" + docker rm -f "$CONTAINER_NAME" } " `; @@ -2297,46 +2297,46 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e "#!/usr/bin/env bash printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-docker.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-docker.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-docker.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-docker.sh start" + echo -e "\\t Starts already created network." + echo "" + echo "./fabric-docker.sh stop" + echo -e "\\t Stops already running network." + echo "" + echo "./fabric-docker.sh reset" + echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." + echo "" + echo "./fabric-docker.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" } " `; exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` "#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. # see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" + local IMAGE="$1" + if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then + docker pull --platform linux/x86_64 "$IMAGE" fi } @@ -2346,61 +2346,61 @@ chaincodeBuild() { local CHAINCODE_DIR_PATH=$3 local RECOMMENDED_NODE_VERSION=$4 - mkdir -p \\"$CHAINCODE_DIR_PATH\\" + mkdir -p "$CHAINCODE_DIR_PATH" # pull required images upfront in case of arm64 (Apple Silicon) architecture # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + if [ "$(uname -m)" = "arm64" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + if [ "$CHAINCODE_LANG" = "java" ]; then + dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + if [ "$CHAINCODE_LANG" = "golang" ]; then + dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) set +e source ~/.nvm/nvm.sh set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" + if [ "$(command -v nvm)" == "nvm" ]; then + current_dir="$(pwd)" + cd "$CHAINCODE_DIR_PATH" set +u nvm install set -u - cd \\"$current_dir\\" + cd "$current_dir" fi fi - NODE_VERSION=\\"$(node --version)\\" + NODE_VERSION="$(node --version)" - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" + USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" + if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then + RECOMMENDED_NODE_VERSION="8.9" fi - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then + echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" + echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) + if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then + (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build && npm install --production) fi fi } @@ -2410,23 +2410,23 @@ chaincodePackage() { local PEER_ADDRESS=$2 local CHAINCODE_NAME=$3 local CHAINCODE_VERSION=$4 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local CHAINCODE_LANG=$5 - echo \\"Packaging chaincode $CHAINCODE_NAME...\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" + echo "Packaging chaincode $CHAINCODE_NAME..." + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CLI_NAME: $CLI_NAME" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode package \\\\ - \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" \\\\ - --path \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - --lang \\"$CHAINCODE_LANG\\" \\\\ - --label \\"$CHAINCODE_LABEL\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode package \\ + "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" \\ + --path "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ + --lang "$CHAINCODE_LANG" \\ + --label "$CHAINCODE_LABEL" # set package owner as current (host) user to fix permission issues - docker exec \\"$CLI_NAME\\" chown \\"$(id -u):$(id -g)\\" \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" + docker exec "$CLI_NAME" chown "$(id -u):$(id -g)" "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" } chaincodeInstall() { @@ -2434,113 +2434,113 @@ chaincodeInstall() { local PEER_ADDRESS=$2 local CHAINCODE_NAME=$3 local CHAINCODE_VERSION=$4 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local CA_CERT=$5 - echo \\"Installing chaincode $CHAINCODE_NAME...\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Installing chaincode $CHAINCODE_NAME..." + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tlsRootCertFiles \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tlsRootCertFiles "/var/hyperledger/cli/$CA_CERT") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode install \\\\ - \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode install \\ + "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeApprove() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - local CHANNEL_NAME=\\"$3\\" + local CHANNEL_NAME="$3" local CHAINCODE_NAME=$4 local CHAINCODE_VERSION=$5 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local ORDERER_URL=$6 local ENDORSEMENT=$7 local INIT_REQUIRED=$8 local CA_CERT=$9 local COLLECTIONS_CONFIG=\${10} - echo \\"Approving chaincode $CHAINCODE_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"INIT_REQUIRED: $INIT_REQUIRED\\" - inputLog \\"CA_CERT: $CA_CERT\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + echo "Approving chaincode $CHAINCODE_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "INIT_REQUIRED: $INIT_REQUIRED" + inputLog "CA_CERT: $CA_CERT" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local ENDORSEMENT_PARAMS=() - if [ -n \\"$ENDORSEMENT\\" ]; then - ENDORSEMENT_PARAMS=(--signature-policy \\"$ENDORSEMENT\\") + if [ -n "$ENDORSEMENT" ]; then + ENDORSEMENT_PARAMS=(--signature-policy "$ENDORSEMENT") fi local INIT_REQUIRED_PARAMS=() - if [ \\"$INIT_REQUIRED\\" = \\"true\\" ]; then + if [ "$INIT_REQUIRED" = "true" ]; then INIT_REQUIRED_PARAMS=(--init-required) fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi local QUERYINSTALLED_RESPONSE local CC_PACKAGE_ID - QUERYINSTALLED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode queryinstalled \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - CC_PACKAGE_ID=\\"$(jq \\".installed_chaincodes | [.[]? | select(.label==\\\\\\"$CHAINCODE_LABEL\\\\\\") ][0].package_id // \\\\\\"\\\\\\"\\" -r <<<\\"$QUERYINSTALLED_RESPONSE\\")\\" - if [ -z \\"$CC_PACKAGE_ID\\" ]; then - CC_PACKAGE_ID=\\"$CHAINCODE_NAME:$CHAINCODE_VERSION\\" + QUERYINSTALLED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode queryinstalled \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + CC_PACKAGE_ID="$(jq ".installed_chaincodes | [.[]? | select(.label==\\"$CHAINCODE_LABEL\\") ][0].package_id // \\"\\"" -r <<<"$QUERYINSTALLED_RESPONSE")" + if [ -z "$CC_PACKAGE_ID" ]; then + CC_PACKAGE_ID="$CHAINCODE_NAME:$CHAINCODE_VERSION" fi - inputLog \\"CC_PACKAGE_ID: $CC_PACKAGE_ID\\" + inputLog "CC_PACKAGE_ID: $CC_PACKAGE_ID" local QUERYCOMMITTED_RESPONSE local SEQUENCE - QUERYCOMMITTED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - SEQUENCE=\\"$(jq \\".chaincode_definitions | [.[]? | select(.name==\\\\\\"$CHAINCODE_NAME\\\\\\").sequence ] | max | select(.!= null)\\" -r <<<\\"$QUERYCOMMITTED_RESPONSE\\")\\" + QUERYCOMMITTED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + SEQUENCE="$(jq ".chaincode_definitions | [.[]? | select(.name==\\"$CHAINCODE_NAME\\").sequence ] | max | select(.!= null)" -r <<<"$QUERYCOMMITTED_RESPONSE")" SEQUENCE=$((SEQUENCE + 1)) - inputLog \\"SEQUENCE: $SEQUENCE\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CC_PACKAGE_ID=\\"$CC_PACKAGE_ID\\" \\"$CLI_NAME\\" peer lifecycle chaincode approveformyorg \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - --package-id \\"$CC_PACKAGE_ID\\" \\\\ - --sequence \\"$SEQUENCE\\" \\\\ - \\"\${ENDORSEMENT_PARAMS[@]+\\"\${ENDORSEMENT_PARAMS[@]}\\"}\\" \\\\ - \\"\${INIT_REQUIRED_PARAMS[@]+\\"\${INIT_REQUIRED_PARAMS[@]}\\"}\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + inputLog "SEQUENCE: $SEQUENCE" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CC_PACKAGE_ID="$CC_PACKAGE_ID" "$CLI_NAME" peer lifecycle chaincode approveformyorg \\ + -o "$ORDERER_URL" \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + --package-id "$CC_PACKAGE_ID" \\ + --sequence "$SEQUENCE" \\ + "\${ENDORSEMENT_PARAMS[@]+"\${ENDORSEMENT_PARAMS[@]}"}" \\ + "\${INIT_REQUIRED_PARAMS[@]+"\${INIT_REQUIRED_PARAMS[@]}"}" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeCommit() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - local CHANNEL_NAME=\\"$3\\" + local CHANNEL_NAME="$3" local CHAINCODE_NAME=$4 local CHAINCODE_VERSION=$5 local ORDERER_URL=$6 @@ -2551,77 +2551,77 @@ chaincodeCommit() { local TLS_ROOT_CERT_FILES=\${11} local COLLECTIONS_CONFIG=\${12} - echo \\"Committing chaincode $CHAINCODE_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"INIT_REQUIRED: $INIT_REQUIRED\\" - inputLog \\"CA_CERT: $CA_CERT\\" - inputLog \\"COMMIT_PEER_ADDRESSES: $COMMIT_PEER_ADDRESSES\\" - inputLog \\"TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + echo "Committing chaincode $CHAINCODE_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "INIT_REQUIRED: $INIT_REQUIRED" + inputLog "CA_CERT: $CA_CERT" + inputLog "COMMIT_PEER_ADDRESSES: $COMMIT_PEER_ADDRESSES" + inputLog "TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COMMIT_PEER_PARAMS=() - if [ -n \\"$COMMIT_PEER_ADDRESSES\\" ]; then + if [ -n "$COMMIT_PEER_ADDRESSES" ]; then # shellcheck disable=SC2207 - COMMIT_PEER_PARAMS=($(echo \\",$COMMIT_PEER_ADDRESSES\\" | sed 's/,/ --peerAddresses /g')) + COMMIT_PEER_PARAMS=($(echo ",$COMMIT_PEER_ADDRESSES" | sed 's/,/ --peerAddresses /g')) fi local TLS_ROOT_CERT_PARAMS=() - if [ -n \\"$TLS_ROOT_CERT_FILES\\" ]; then + if [ -n "$TLS_ROOT_CERT_FILES" ]; then # shellcheck disable=SC2207 - TLS_ROOT_CERT_PARAMS=(--tls $(echo \\",$TLS_ROOT_CERT_FILES\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')) + TLS_ROOT_CERT_PARAMS=(--tls $(echo ",$TLS_ROOT_CERT_FILES" | sed 's/,/ --tlsRootCertFiles \\/var\\/hyperledger\\/cli\\//g')) fi local ENDORSEMENT_PARAMS=() - if [ -n \\"$ENDORSEMENT\\" ]; then - ENDORSEMENT_PARAMS=(--signature-policy \\"$ENDORSEMENT\\") + if [ -n "$ENDORSEMENT" ]; then + ENDORSEMENT_PARAMS=(--signature-policy "$ENDORSEMENT") fi local INIT_REQUIRED_PARAMS=() - if [ \\"$INIT_REQUIRED\\" = \\"true\\" ]; then + if [ "$INIT_REQUIRED" = "true" ]; then INIT_REQUIRED_PARAMS=(--init-required) fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi local QUERYCOMMITTED_RESPONSE local SEQUENCE - QUERYCOMMITTED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - SEQUENCE=\\"$(jq \\".chaincode_definitions | [.[]? | select(.name==\\\\\\"$CHAINCODE_NAME\\\\\\").sequence ] | max | select(.!= null)\\" -r <<<\\"$QUERYCOMMITTED_RESPONSE\\")\\" + QUERYCOMMITTED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + SEQUENCE="$(jq ".chaincode_definitions | [.[]? | select(.name==\\"$CHAINCODE_NAME\\").sequence ] | max | select(.!= null)" -r <<<"$QUERYCOMMITTED_RESPONSE")" SEQUENCE=$((SEQUENCE + 1)) - inputLog \\"SEQUENCE: $SEQUENCE\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode commit \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - --sequence \\"$SEQUENCE\\" \\\\ - \\"\${ENDORSEMENT_PARAMS[@]+\\"\${ENDORSEMENT_PARAMS[@]}\\"}\\" \\\\ - \\"\${INIT_REQUIRED_PARAMS[@]+\\"\${INIT_REQUIRED_PARAMS[@]}\\"}\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${COMMIT_PEER_PARAMS[@]+\\"\${COMMIT_PEER_PARAMS[@]}\\"}\\" \\\\ - \\"\${TLS_ROOT_CERT_PARAMS[@]+\\"\${TLS_ROOT_CERT_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + inputLog "SEQUENCE: $SEQUENCE" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode commit \\ + -o "$ORDERER_URL" \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + --sequence "$SEQUENCE" \\ + "\${ENDORSEMENT_PARAMS[@]+"\${ENDORSEMENT_PARAMS[@]}"}" \\ + "\${INIT_REQUIRED_PARAMS[@]+"\${INIT_REQUIRED_PARAMS[@]}"}" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${COMMIT_PEER_PARAMS[@]+"\${COMMIT_PEER_PARAMS[@]}"}" \\ + "\${TLS_ROOT_CERT_PARAMS[@]+"\${TLS_ROOT_CERT_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } peerChaincodeList() { @@ -2629,13 +2629,13 @@ peerChaincodeList() { local PEER_ADDRESS=$2 local CHANNEL_NAME=$3 - echo \\"Chaincodes list:\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" # Execute the command to list chaincodes - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" } peerChaincodeListTls() { @@ -2644,84 +2644,84 @@ peerChaincodeListTls() { local CHANNEL_NAME=$3 local CA_CERT=$4 - echo \\"Chaincodes list:\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CA_CERT: $CA_CERT" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --tls \\\\ - --cafile \\"/var/hyperledger/cli/$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --tls \\ + --cafile "/var/hyperledger/cli/$CA_CERT" } # Function to perform chaincode invoke peerChaincodeInvoke() { - local CLI=\\"$1\\" - local PEERS=\\"$2\\" - local CHANNEL=\\"$3\\" - local CHAINCODE=\\"$4\\" - local COMMAND=\\"$5\\" - local TRANSIENT=\\"$6\\" - - echo \\"Chaincode invoke:\\" - inputLog \\"CLI: $CLI\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ + docker exec "$CLI" peer chaincode invoke \\ + $PEER_ADDRESSES \\ + -C "$CHANNEL" \\ + -n "$CHAINCODE" \\ + -c "$COMMAND" \\ + --transient "$TRANSIENT" \\ + --waitForEvent \\ + --waitForEventTimeout 90s \\ 2>&1 } # Function to perform chaincode invoke for Tls peerChaincodeInvokeTls() { - local CLI=\\"$1\\" - local PEERS=\\"$2\\" - local CHANNEL=\\"$3\\" - local CHAINCODE=\\"$4\\" - local COMMAND=\\"$5\\" - local TRANSIENT=\\"$6\\" - local PEER_CERTS=\\"$7\\" - local CA_CERT=\\"$8\\" - - echo \\"Chaincode invoke:\\" - inputLog \\"CLI: $CLI\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - inputLog \\"PEER_CERTS: $PEER_CERTS\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - TLS_ROOT_CERT_FILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEER_CERTS\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')\\" + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + local PEER_CERTS="$7" + local CA_CERT="$8" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + inputLog "PEER_CERTS: $PEER_CERTS" + inputLog "CA_CERT: $CA_CERT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" + + TLS_ROOT_CERT_FILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$PEER_CERTS" | sed 's/,/ --tlsRootCertFiles \\/var\\/hyperledger\\/cli\\//g')" # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - $TLS_ROOT_CERT_FILES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - --tls \\\\ - --cafile \\"/var/hyperledger/cli/$CA_CERT\\" \\\\ + docker exec "$CLI" peer chaincode invoke \\ + $PEER_ADDRESSES \\ + $TLS_ROOT_CERT_FILES \\ + -C "$CHANNEL" \\ + -n "$CHAINCODE" \\ + -c "$COMMAND" \\ + --transient "$TRANSIENT" \\ + --waitForEvent \\ + --waitForEventTimeout 90s \\ + --tls \\ + --cafile "/var/hyperledger/cli/$CA_CERT" \\ 2>&1 } " @@ -2734,11 +2734,11 @@ peerChannelList() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list } peerChannelGetInfo() { @@ -2746,13 +2746,13 @@ peerChannelGetInfo() { local CLI_NAME=$2 local PEER_ADDRESS=$3 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" } peerChannelFetchConfig() { @@ -2761,53 +2761,53 @@ peerChannelFetchConfig() { local CONFIG_FILE_NAME=$3 local PEER_ADDRESS=$4 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local TARGET_FILE="$5" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } #=== TLS equivalents ========================================================= @@ -2817,11 +2817,11 @@ peerChannelListTls() { local PEER_ADDRESS=$2 local CA_CERT=$3 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" } peerChannelGetInfoTls() { @@ -2830,13 +2830,13 @@ peerChannelGetInfoTls() { local PEER_ADDRESS=$3 local CA_CERT=$4 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" } peerChannelFetchConfigTls() { @@ -2846,54 +2846,54 @@ peerChannelFetchConfigTls() { local PEER_ADDRESS=$4 local CA_CERT=$5 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local CA_CERT="$5" + local TARGET_FILE="$6" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" + + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } " `; @@ -2908,26 +2908,26 @@ createChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Creating channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx + peer channel join -b "\${CHANNEL_NAME}".block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } createChannelAndJoinTls() { @@ -2935,9 +2935,9 @@ createChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -2946,24 +2946,24 @@ createChannelAndJoinTls() { local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Creating channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoin() { @@ -2971,24 +2971,24 @@ fetchChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Fetching channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" + peer channel join -b "\${CHANNEL_NAME}"_newest.block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoinTls() { @@ -2996,9 +2996,9 @@ fetchChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -3007,22 +3007,22 @@ fetchChannelAndJoinTls() { local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } " `; @@ -3031,108 +3031,108 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e "#!/usr/bin/env bash __getOrdererAndPeerNodes() { - echo \\" + echo " orderer0.group1.orderer.example.com peer0.org1.example.com peer1.org1.example.com - \\" + " } __getCASQLiteNodes() { - echo \\" + echo " ca.orderer.example.com ca.org1.example.com - \\" + " } __getCAPostgresNodes() { - echo \\" - \\" + echo " + " } __createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + cd "$FABLO_NETWORK_ROOT/.." + backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then + echo "Error: Directory '$backup_dir' already exists and is not empty!" exit 1 fi - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" + mkdir -p "$backup_dir" + cp -R ./fablo-target "$backup_dir/" for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node" + docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" done for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node/pg-data" + docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" done for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + echo "Saving state of $node..." + docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" done } __cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" + cd "$FABLO_NETWORK_ROOT/.." + target_dir="$1" + hook_cmd="$2" - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + if [ -d "$target_dir/fablo-target" ]; then + echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." exit 1 fi - cp -R ./fablo-target \\"$target_dir/fablo-target\\" + cp -R ./fablo-target "$target_dir/fablo-target" - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + if [ -n "$hook_cmd" ]; then + echo "Executing pre-restore hook: '$hook_cmd'" + (cd "$target_dir" && eval "$hook_cmd") fi - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" fi done for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" fi done for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + docker cp "./$node/" "$node:/var/hyperledger/production/" fi done } createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") + (set -eu && __createSnapshot "$1") } cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") + (set -eu && __cloneSnapshot "$1" "$2") } " `; @@ -3141,12 +3141,12 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e "#!/usr/bin/env bash # The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" +echo "Executing post-generate hook" " `; exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper files from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` -Array [ +[ "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore", "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-config/configtx.yaml", "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 831a525a..2c891307 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -25,13 +25,13 @@ Channel: &ChannelDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Capabilities: <<: *ChannelCapabilities @@ -47,16 +47,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Orderer1MSP.member')\\" + Rule: "OR('Orderer1MSP.member')" Writers: Type: Signature - Rule: \\"OR('Orderer1MSP.member')\\" + Rule: "OR('Orderer1MSP.member')" Admins: Type: Signature - Rule: \\"OR('Orderer1MSP.admin')\\" + Rule: "OR('Orderer1MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Orderer1MSP.member')\\" + Rule: "OR('Orderer1MSP.member')" AnchorPeers: @@ -68,16 +68,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Orderer2MSP.member')\\" + Rule: "OR('Orderer2MSP.member')" Writers: Type: Signature - Rule: \\"OR('Orderer2MSP.member')\\" + Rule: "OR('Orderer2MSP.member')" Admins: Type: Signature - Rule: \\"OR('Orderer2MSP.admin')\\" + Rule: "OR('Orderer2MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Orderer2MSP.member')\\" + Rule: "OR('Orderer2MSP.member')" AnchorPeers: @@ -89,16 +89,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" + Rule: "OR('Org1MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" AnchorPeers: - Host: peer0.org1.example.com @@ -115,16 +115,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org2MSP.admin')\\" + Rule: "OR('Org2MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" AnchorPeers: - Host: peer0.org2.example.com @@ -144,16 +144,16 @@ Application: &ApplicationDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" + Rule: "MAJORITY Endorsement" Capabilities: <<: *ApplicationCapabilities @@ -195,18 +195,18 @@ Orderer: &Group1Defaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" # BlockValidation specifies what signatures must be included in the block # from the orderer for the peer to validate it. BlockValidation: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Capabilities: <<: *OrdererCapabilities @@ -226,18 +226,18 @@ Orderer: &Group2Defaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" # BlockValidation specifies what signatures must be included in the block # from the orderer for the peer to validate it. BlockValidation: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Capabilities: <<: *OrdererCapabilities @@ -348,73 +348,73 @@ Profiles: exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer1.json from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "{ - \\"name\\": \\"fablo-test-network-orderer1\\", - \\"description\\": \\"Connection profile for Orderer1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer1\\" + "name": "fablo-test-network-orderer1", + "description": "Connection profile for Orderer1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer1" }, - \\"organizations\\": { - \\"Orderer1\\": { - \\"mspid\\": \\"Orderer1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "organizations": { + "Orderer1": { + "mspid": "Orderer1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.orderer1.com\\" + "certificateAuthorities": [ + "ca.orderer1.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7081\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7081", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7082\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7082", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.orderer1.com\\": { - \\"url\\": \\"https://localhost:7020\\", - \\"caName\\": \\"ca.orderer1.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer1.com/ca/ca.orderer1.com-cert.pem\\" + "certificateAuthorities": { + "ca.orderer1.com": { + "url": "https://localhost:7020", + "caName": "ca.orderer1.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer1.com/ca/ca.orderer1.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -481,73 +481,73 @@ certificateAuthorities: exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer2.json from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "{ - \\"name\\": \\"fablo-test-network-orderer2\\", - \\"description\\": \\"Connection profile for Orderer2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer2\\" + "name": "fablo-test-network-orderer2", + "description": "Connection profile for Orderer2 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer2" }, - \\"organizations\\": { - \\"Orderer2\\": { - \\"mspid\\": \\"Orderer2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "organizations": { + "Orderer2": { + "mspid": "Orderer2MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.orderer2.com\\" + "certificateAuthorities": [ + "ca.orderer2.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7081\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7081", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7082\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7082", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.orderer2.com\\": { - \\"url\\": \\"https://localhost:7040\\", - \\"caName\\": \\"ca.orderer2.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer2.com/ca/ca.orderer2.com-cert.pem\\" + "certificateAuthorities": { + "ca.orderer2.com": { + "url": "https://localhost:7040", + "caName": "ca.orderer2.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer2.com/ca/ca.orderer2.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -614,73 +614,73 @@ certificateAuthorities: exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Org1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1" }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" + "certificateAuthorities": [ + "ca.org1.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7081\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7081", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7082\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7082", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"https://localhost:7060\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.org1.example.com": { + "url": "https://localhost:7060", + "caName": "ca.org1.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -747,73 +747,73 @@ certificateAuthorities: exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Org2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\" + "name": "fablo-test-network-org2", + "description": "Connection profile for Org2 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org2" }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "organizations": { + "Org2": { + "mspid": "Org2MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org2.example.com\\" + "certificateAuthorities": [ + "ca.org2.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7081\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7081", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7082\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7082", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.org2.example.com\\": { - \\"url\\": \\"https://localhost:7080\\", - \\"caName\\": \\"ca.org2.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.org2.example.com": { + "url": "https://localhost:7080", + "caName": "ca.org2.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -932,17 +932,17 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" }, - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + "network-org2": { + "name": "Network of Org2", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; @@ -961,14 +961,14 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -976,9 +976,9 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -996,7 +996,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1063,11 +1063,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1079,25 +1079,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1118,7 +1118,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1137,11 +1137,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1153,7 +1153,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1161,9 +1161,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1195,18 +1195,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1235,7 +1235,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1256,7 +1256,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1312,7 +1312,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1340,12 +1340,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1462,14 +1462,14 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1477,9 +1477,9 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1497,7 +1497,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1564,11 +1564,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1580,25 +1580,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1619,7 +1619,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1638,11 +1638,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1654,7 +1654,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1662,9 +1662,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1696,18 +1696,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1736,7 +1736,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1757,7 +1757,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1813,7 +1813,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1841,12 +1841,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1963,14 +1963,14 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1978,9 +1978,9 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1998,7 +1998,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -2065,11 +2065,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -2081,25 +2081,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -2120,7 +2120,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -2139,11 +2139,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -2155,7 +2155,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -2163,9 +2163,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -2197,18 +2197,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -2237,7 +2237,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -2258,7 +2258,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -2314,7 +2314,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -2342,12 +2342,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -2464,14 +2464,14 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -2479,9 +2479,9 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -2499,7 +2499,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -2566,11 +2566,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -2582,25 +2582,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -2621,7 +2621,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -2640,11 +2640,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -2656,7 +2656,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -2664,9 +2664,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -2698,18 +2698,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -2738,7 +2738,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -2759,7 +2759,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -2815,7 +2815,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -2843,12 +2843,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -2956,16 +2956,16 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro set -eu -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/.env" +source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" networkUp() { generateArtifacts @@ -2977,45 +2977,45 @@ networkUp() { printStartSuccessInfo } -if [ \\"$1\\" = \\"up\\" ]; then +if [ "$1" = "up" ]; then networkUp -elif [ \\"$1\\" = \\"down\\" ]; then +elif [ "$1" = "down" ]; then networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then +elif [ "$1" = "reset" ]; then networkDown networkUp -elif [ \\"$1\\" = \\"start\\" ]; then +elif [ "$1" = "start" ]; then startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then +elif [ "$1" = "stop" ]; then stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then + chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then +elif [ "$1" = "--help" ]; then printHelp else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" fi " `; @@ -3066,35 +3066,35 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro "#!/usr/bin/env bash chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + elif [ "$1" = "peer0.org1.example.com" ]; then - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org1.example.com" "peer0.org1.example.com:7061" "$2" "crypto-orderer/tlsca.orderer1.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + [ "$1" = "peer1.org1.example.com" ] then - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org1.example.com" "peer1.org1.example.com:7062" "$2" "crypto-orderer/tlsca.orderer1.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + [ "$1" = "peer0.org2.example.com" ] then - peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org2.example.com" "peer0.org2.example.com:7081" "$2" "crypto-orderer/tlsca.orderer1.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer1.org2.example.com\\" ] + [ "$1" = "peer1.org2.example.com" ] then - peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org2.example.com" "peer1.org2.example.com:7082" "$2" "crypto-orderer/tlsca.orderer1.com-cert.pem" # Third argument is channel name else - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" exit 1 fi @@ -3107,62 +3107,62 @@ chaincodeList() { # 4. chaincode command # 5. transient data (optional) chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" exit 1 fi - cli=\\"\\" - peer_addresses=\\"\\" + cli="" + peer_addresses="" - peer_certs=\\"\\" + peer_certs="" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7061\\" + if [[ "$1" == *"peer0.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer0.org1.example.com:7061" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7062\\" + if [[ "$1" == *"peer1.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer1.org1.example.com:7062" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7081\\" + if [[ "$1" == *"peer0.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer0.org2.example.com:7081" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7082\\" + if [[ "$1" == *"peer1.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer1.org2.example.com:7082" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt" fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" exit 1 fi - if [ \\"$2\\" = \\"my-channel1\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + if [ "$2" = "my-channel1" ]; then + ca_cert="crypto-orderer/tlsca.orderer1.com-cert.pem" fi - if [ \\"$2\\" = \\"my-channel2\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + if [ "$2" = "my-channel2" ]; then + ca_cert="crypto-orderer/tlsca.orderer1.com-cert.pem" fi - if [ \\"$2\\" = \\"my-channel3\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + if [ "$2" = "my-channel3" ]; then + ca_cert="crypto-orderer/tlsca.orderer1.com-cert.pem" fi - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" + peerChaincodeInvokeTls "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" "\${peer_certs:1}" "$ca_cert" } " @@ -3171,283 +3171,283 @@ chaincodeInvoke() { exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "#!/usr/bin/env bash -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" set -eu channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" + echo "-> Channel query: " + "$@" - if [ \\"$#\\" -eq 1 ]; then + if [ "$#" -eq 1 ]; then printChannelsHelp - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - peerChannelListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelListTls "cli.org1.example.com" "peer0.org1.example.com:7061" "crypto-orderer/tlsca.orderer1.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] then - peerChannelListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelListTls "cli.org1.example.com" "peer1.org1.example.com:7062" "crypto-orderer/tlsca.orderer1.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] then - peerChannelListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelListTls "cli.org2.example.com" "peer0.org2.example.com:7081" "crypto-orderer/tlsca.orderer1.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer1" ] then - peerChannelListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelListTls "cli.org2.example.com" "peer1.org2.example.com:7082" "crypto-orderer/tlsca.orderer1.com-cert.pem" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelGetInfoTls "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7061" "crypto-orderer/tlsca.orderer1.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7061\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7061" "crypto-orderer/tlsca.orderer1.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7061\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7061" "crypto-orderer/tlsca.orderer1.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelGetInfoTls "my-channel1" "cli.org2.example.com" "peer0.org2.example.com:7081" "crypto-orderer/tlsca.orderer1.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7081\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel1" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7081" "crypto-orderer/tlsca.orderer1.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7081\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel1" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7081" "crypto-orderer/tlsca.orderer1.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelGetInfoTls "my-channel2" "cli.org1.example.com" "peer1.org1.example.com:7062" "crypto-orderer/tlsca.orderer1.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7062\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel2" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7062" "crypto-orderer/tlsca.orderer1.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7062\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel2" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7062" "crypto-orderer/tlsca.orderer1.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org2" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelGetInfoTls "my-channel2" "cli.org2.example.com" "peer1.org2.example.com:7082" "crypto-orderer/tlsca.orderer1.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org2.example.com:7082\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel2" "cli.org2.example.com" "$TARGET_FILE" "peer1.org2.example.com:7082" "crypto-orderer/tlsca.orderer1.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org2.example.com:7082\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel2" "cli.org2.example.com" "\${BLOCK_NAME}" "peer1.org2.example.com:7082" "crypto-orderer/tlsca.orderer1.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel3\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel3" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" + peerChannelGetInfoTls "my-channel3" "cli.org1.example.com" "peer0.org1.example.com:7061" "crypto-orderer/tlsca.orderer2.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7061\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel3" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7061" "crypto-orderer/tlsca.orderer2.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7061\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel3" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7061" "crypto-orderer/tlsca.orderer2.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel3\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel3" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" + peerChannelGetInfoTls "my-channel3" "cli.org1.example.com" "peer1.org1.example.com:7062" "crypto-orderer/tlsca.orderer2.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7062\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel3" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7062" "crypto-orderer/tlsca.orderer2.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7062\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel3" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7062" "crypto-orderer/tlsca.orderer2.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel3\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel3" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" + peerChannelGetInfoTls "my-channel3" "cli.org2.example.com" "peer0.org2.example.com:7081" "crypto-orderer/tlsca.orderer2.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7081\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel3" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7081" "crypto-orderer/tlsca.orderer2.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7081\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel3" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7081" "crypto-orderer/tlsca.orderer2.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel3\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel3" ] && [ "$3" = "org2" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" + peerChannelGetInfoTls "my-channel3" "cli.org2.example.com" "peer1.org2.example.com:7082" "crypto-orderer/tlsca.orderer2.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org2.example.com:7082\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel3" "cli.org2.example.com" "$TARGET_FILE" "peer1.org2.example.com:7082" "crypto-orderer/tlsca.orderer2.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org2.example.com:7082\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel3" "cli.org2.example.com" "\${BLOCK_NAME}" "peer1.org2.example.com:7082" "crypto-orderer/tlsca.orderer2.com-cert.pem" "$TARGET_FILE" else - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + echo "$@" + echo "$1, $2, $3, $4, $5, $6, $7, $#" printChannelsHelp fi } printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org2 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org2 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org2 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel3 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel3 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel3 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel3 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel3 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel3 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel3 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel3 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel3 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel3 org2 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel3 org2 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel3 org2 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" + echo "Channel management commands:" + echo "" + + echo "fablo channel list org1 peer0" + echo -e "\\t List channels on 'peer0' of 'Org1'". + echo "" + + echo "fablo channel list org1 peer1" + echo -e "\\t List channels on 'peer1' of 'Org1'". + echo "" + + echo "fablo channel list org2 peer0" + echo -e "\\t List channels on 'peer0' of 'Org2'". + echo "" + + echo "fablo channel list org2 peer1" + echo -e "\\t List channels on 'peer1' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org2 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel1 org2 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel1 org2 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel2 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel2 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel2 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel2 org2 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel2 org2 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel2 org2 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel3 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel3 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel3 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel3 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel3 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel3 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel3 org2 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel3 org2 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel3 org2 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel3 org2 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel3 org2 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel3 org2 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'". + echo "" } " @@ -3457,314 +3457,314 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro "#!/usr/bin/env bash generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" + printHeadline "Generating basic configs" "U1F913" - printItalics \\"Generating crypto material for Orderer1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer1.yaml\\" \\"peerOrganizations/orderer1.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Orderer1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer1.yaml" "peerOrganizations/orderer1.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Orderer2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer2.yaml\\" \\"peerOrganizations/orderer2.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Orderer2" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer2.yaml" "peerOrganizations/orderer2.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org2" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + printItalics "Generating genesis block for group group1" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" - printItalics \\"Generating genesis block for group group2\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group2Genesis\\" + printItalics "Generating genesis block for group group2" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group2Genesis" # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" } startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + printHeadline "Starting network" "U1F680" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) sleep 4 } generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - printHeadline \\"Generating config for 'my-channel2'\\" \\"U1F913\\" - createChannelTx \\"my-channel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - printHeadline \\"Generating config for 'my-channel3'\\" \\"U1F913\\" - createChannelTx \\"my-channel3\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel3\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Generating config for 'my-channel1'" "U1F913" + createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" + printHeadline "Generating config for 'my-channel2'" "U1F913" + createChannelTx "my-channel2" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config/config" + printHeadline "Generating config for 'my-channel3'" "U1F913" + createChannelTx "my-channel3" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel3" "$FABLO_NETWORK_ROOT/fabric-config/config" } installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7061' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer1.com-cert.pem' 'orderer0.group1.orderer1.com:7030';\\" - - printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7081' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer1.com-cert.pem' 'orderer0.group1.orderer1.com:7030';\\" - printHeadline \\"Creating 'my-channel2' on Org1/peer1\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7062' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer1.com-cert.pem' 'orderer0.group1.orderer1.com:7030';\\" - - printItalics \\"Joining 'my-channel2' on Org2/peer1\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7082' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer1.com-cert.pem' 'orderer0.group1.orderer1.com:7030';\\" - printHeadline \\"Creating 'my-channel3' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel3' 'Org1MSP' 'peer0.org1.example.com:7061' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer2.com-cert.pem' 'orderer0.group2.orderer2.com:7050';\\" - - printItalics \\"Joining 'my-channel3' on Org1/peer1\\" \\"U1F638\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org1MSP' 'peer1.org1.example.com:7062' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer2.com-cert.pem' 'orderer0.group2.orderer2.com:7050';\\" - printItalics \\"Joining 'my-channel3' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer0.org2.example.com:7081' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer2.com-cert.pem' 'orderer0.group2.orderer2.com:7050';\\" - printItalics \\"Joining 'my-channel3' on Org2/peer1\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer1.org2.example.com:7082' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer2.com-cert.pem' 'orderer0.group2.orderer2.com:7050';\\" + printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7061' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer1.com-cert.pem' 'orderer0.group1.orderer1.com:7030';" + + printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7081' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer1.com-cert.pem' 'orderer0.group1.orderer1.com:7030';" + printHeadline "Creating 'my-channel2' on Org1/peer1" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7062' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer1.com-cert.pem' 'orderer0.group1.orderer1.com:7030';" + + printItalics "Joining 'my-channel2' on Org2/peer1" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7082' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer1.com-cert.pem' 'orderer0.group1.orderer1.com:7030';" + printHeadline "Creating 'my-channel3' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel3' 'Org1MSP' 'peer0.org1.example.com:7061' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer2.com-cert.pem' 'orderer0.group2.orderer2.com:7050';" + + printItalics "Joining 'my-channel3' on Org1/peer1" "U1F638" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org1MSP' 'peer1.org1.example.com:7062' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer2.com-cert.pem' 'orderer0.group2.orderer2.com:7050';" + printItalics "Joining 'my-channel3' on Org2/peer0" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer0.org2.example.com:7081' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer2.com-cert.pem' 'orderer0.group2.orderer2.com:7050';" + printItalics "Joining 'my-channel3' on Org2/peer1" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer1.org2.example.com:7082' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer2.com-cert.pem' 'orderer0.group2.orderer2.com:7050';" } installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - local version=\\"0.0.1\\" - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"16\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printHeadline \\"Installing 'chaincode1' for Org2\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"peer0.org1.example.com:7061,peer0.org2.example.com:7081\\" \\"crypto-peer/peer0.org1.example.com/tls/ca.crt,crypto-peer/peer0.org2.example.com/tls/ca.crt\\" \\"\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + local version="0.0.1" + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7061" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7061" "chaincode1" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printHeadline "Installing 'chaincode1' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7081" "chaincode1" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7081" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "peer0.org1.example.com:7061,peer0.org2.example.com:7081" "crypto-peer/peer0.org1.example.com/tls/ca.crt,crypto-peer/peer0.org2.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then - local version=\\"0.0.1\\" - printHeadline \\"Packaging chaincode 'chaincode2'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" \\"16\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"chaincode2\\" \\"$version\\" \\"java\\" printHeadline \\"Installing 'chaincode2' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"chaincode2\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printHeadline \\"Installing 'chaincode2' for Org2\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"chaincode2\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"peer1.org1.example.com:7062,peer1.org2.example.com:7082\\" \\"crypto-peer/peer1.org1.example.com/tls/ca.crt,crypto-peer/peer1.org2.example.com/tls/ca.crt\\" \\"\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple")" ]; then + local version="0.0.1" + printHeadline "Packaging chaincode 'chaincode2'" "U1F60E" + chaincodeBuild "chaincode2" "java" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple" "16" + chaincodePackage "cli.org1.example.com" "peer1.org1.example.com:7062" "chaincode2" "$version" "java" printHeadline "Installing 'chaincode2' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7062" "chaincode2" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer1.org1.example.com:7062" "my-channel2" "chaincode2" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printHeadline "Installing 'chaincode2' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer1.org2.example.com:7082" "chaincode2" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org2.example.com" "peer1.org2.example.com:7082" "my-channel2" "chaincode2" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer1.org1.example.com:7062" "my-channel2" "chaincode2" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "peer1.org1.example.com:7062,peer1.org2.example.com:7082" "crypto-peer/peer1.org1.example.com/tls/ca.crt,crypto-peer/peer1.org2.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode2' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" + echo "Warning! Skipping chaincode 'chaincode2' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'" fi } installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"16\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printHeadline \\"Installing 'chaincode1' for Org2\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"peer0.org1.example.com:7061,peer0.org2.example.com:7081\\" \\"crypto-peer/peer0.org1.example.com/tls/ca.crt,crypto-peer/peer0.org2.example.com/tls/ca.crt\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7061" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7061" "chaincode1" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printHeadline "Installing 'chaincode1' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7081" "chaincode1" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7081" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "peer0.org1.example.com:7061,peer0.org2.example.com:7081" "crypto-peer/peer0.org1.example.com/tls/ca.crt,crypto-peer/peer0.org2.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi fi - if [ \\"$chaincodeName\\" = \\"chaincode2\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then - printHeadline \\"Packaging chaincode 'chaincode2'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" \\"16\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"chaincode2\\" \\"$version\\" \\"java\\" printHeadline \\"Installing 'chaincode2' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"chaincode2\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printHeadline \\"Installing 'chaincode2' for Org2\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"chaincode2\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"peer1.org1.example.com:7062,peer1.org2.example.com:7082\\" \\"crypto-peer/peer1.org1.example.com/tls/ca.crt,crypto-peer/peer1.org2.example.com/tls/ca.crt\\" \\"\\" + if [ "$chaincodeName" = "chaincode2" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple")" ]; then + printHeadline "Packaging chaincode 'chaincode2'" "U1F60E" + chaincodeBuild "chaincode2" "java" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple" "16" + chaincodePackage "cli.org1.example.com" "peer1.org1.example.com:7062" "chaincode2" "$version" "java" printHeadline "Installing 'chaincode2' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7062" "chaincode2" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer1.org1.example.com:7062" "my-channel2" "chaincode2" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printHeadline "Installing 'chaincode2' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer1.org2.example.com:7082" "chaincode2" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org2.example.com" "peer1.org2.example.com:7082" "my-channel2" "chaincode2" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer1.org1.example.com:7062" "my-channel2" "chaincode2" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "peer1.org1.example.com:7062,peer1.org2.example.com:7082" "crypto-peer/peer1.org1.example.com/tls/ca.crt,crypto-peer/peer1.org2.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode2' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" + echo "Warning! Skipping chaincode 'chaincode2' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'" fi fi } runDevModeChaincode() { local chaincodeName=$1 - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - local version=\\"0.0.1\\" - printHeadline \\"Approving 'chaincode1' for Org1 (dev mode)\\" \\"U1F60E\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"\\" \\"\\" - printHeadline \\"Approving 'chaincode1' for Org2 (dev mode)\\" \\"U1F60E\\" - chaincodeApprove \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1' (dev mode)\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"\\" \\"peer0.org1.example.com:7061,peer0.org2.example.com:7081\\" \\"\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + local version="0.0.1" + printHeadline "Approving 'chaincode1' for Org1 (dev mode)" "U1F60E" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "" "" + printHeadline "Approving 'chaincode1' for Org2 (dev mode)" "U1F60E" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7081" "my-channel1" "chaincode1" "0.0.1" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1' (dev mode)" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "" "peer0.org1.example.com:7061,peer0.org2.example.com:7081" "" "" fi - if [ \\"$chaincodeName\\" = \\"chaincode2\\" ]; then - local version=\\"0.0.1\\" - printHeadline \\"Approving 'chaincode2' for Org1 (dev mode)\\" \\"U1F60E\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"\\" \\"\\" - printHeadline \\"Approving 'chaincode2' for Org2 (dev mode)\\" \\"U1F60E\\" - chaincodeApprove \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode2' on channel 'my-channel2' as 'Org1' (dev mode)\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"\\" \\"peer1.org1.example.com:7062,peer1.org2.example.com:7082\\" \\"\\" \\"\\" + if [ "$chaincodeName" = "chaincode2" ]; then + local version="0.0.1" + printHeadline "Approving 'chaincode2' for Org1 (dev mode)" "U1F60E" + chaincodeApprove "cli.org1.example.com" "peer1.org1.example.com:7062" "my-channel2" "chaincode2" "0.0.1" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "" "" + printHeadline "Approving 'chaincode2' for Org2 (dev mode)" "U1F60E" + chaincodeApprove "cli.org2.example.com" "peer1.org2.example.com:7082" "my-channel2" "chaincode2" "0.0.1" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "" "" + printItalics "Committing chaincode 'chaincode2' on channel 'my-channel2' as 'Org1' (dev mode)" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer1.org1.example.com:7062" "my-channel2" "chaincode2" "0.0.1" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "" "peer1.org1.example.com:7062,peer1.org2.example.com:7082" "" "" fi } upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"16\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printHeadline \\"Installing 'chaincode1' for Org2\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7081\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"peer0.org1.example.com:7061,peer0.org2.example.com:7081\\" \\"crypto-peer/peer0.org1.example.com/tls/ca.crt,crypto-peer/peer0.org2.example.com/tls/ca.crt\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7061" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7061" "chaincode1" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printHeadline "Installing 'chaincode1' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7081" "chaincode1" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7081" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7061" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "peer0.org1.example.com:7061,peer0.org2.example.com:7081" "crypto-peer/peer0.org1.example.com/tls/ca.crt,crypto-peer/peer0.org2.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi fi - if [ \\"$chaincodeName\\" = \\"chaincode2\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then - printHeadline \\"Packaging chaincode 'chaincode2'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" \\"16\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"chaincode2\\" \\"$version\\" \\"java\\" printHeadline \\"Installing 'chaincode2' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"chaincode2\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printHeadline \\"Installing 'chaincode2' for Org2\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"chaincode2\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - chaincodeApprove \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7082\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"orderer0.group1.orderer1.com:7030\\" \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"false\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" \\"peer1.org1.example.com:7062,peer1.org2.example.com:7082\\" \\"crypto-peer/peer1.org1.example.com/tls/ca.crt,crypto-peer/peer1.org2.example.com/tls/ca.crt\\" \\"\\" + if [ "$chaincodeName" = "chaincode2" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple")" ]; then + printHeadline "Packaging chaincode 'chaincode2'" "U1F60E" + chaincodeBuild "chaincode2" "java" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple" "16" + chaincodePackage "cli.org1.example.com" "peer1.org1.example.com:7062" "chaincode2" "$version" "java" printHeadline "Installing 'chaincode2' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7062" "chaincode2" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer1.org1.example.com:7062" "my-channel2" "chaincode2" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printHeadline "Installing 'chaincode2' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer1.org2.example.com:7082" "chaincode2" "$version" "crypto-orderer/tlsca.orderer1.com-cert.pem" + chaincodeApprove "cli.org2.example.com" "peer1.org2.example.com:7082" "my-channel2" "chaincode2" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer1.org1.example.com:7062" "my-channel2" "chaincode2" "$version" "orderer0.group1.orderer1.com:7030" "OR ('Org1MSP.member', 'Org2MSP.member')" "false" "crypto-orderer/tlsca.orderer1.com-cert.pem" "peer1.org1.example.com:7062,peer1.org2.example.com:7082" "crypto-peer/peer1.org1.example.com/tls/ca.crt,crypto-peer/peer1.org2.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode2' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" + echo "Warning! Skipping chaincode 'chaincode2' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'" fi fi } notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel3\\" \\"Org1MSP\\" \\"MyChannel3\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel3\\" \\"Org2MSP\\" \\"MyChannel3\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer1.com:7030\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer1.com:7030\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer1.com:7030\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer1.com:7030\\" \\"crypto-orderer/tlsca.orderer1.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel3\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group2.orderer2.com:7050\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel3\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group2.orderer2.com:7050\\" \\"crypto-orderer/tlsca.orderer2.com-cert.pem\\" - - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" - deleteNewChannelUpdateTx \\"my-channel3\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel3\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" + printHeadline "Creating new channel config blocks" "U1F537" + createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel1" "Org2MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel2" "Org1MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel2" "Org2MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel3" "Org1MSP" "MyChannel3" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel3" "Org2MSP" "MyChannel3" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + + printHeadline "Notyfing orgs about channels" "U1F4E2" + notifyOrgAboutNewChannelTls "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer1.com:7030" "crypto-orderer/tlsca.orderer1.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel1" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer1.com:7030" "crypto-orderer/tlsca.orderer1.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel2" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer1.com:7030" "crypto-orderer/tlsca.orderer1.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel2" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer1.com:7030" "crypto-orderer/tlsca.orderer1.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel3" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group2.orderer2.com:7050" "crypto-orderer/tlsca.orderer2.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel3" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group2.orderer2.com:7050" "crypto-orderer/tlsca.orderer2.com-cert.pem" + + printHeadline "Deleting new channel config blocks" "U1F52A" + deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel1" "Org2MSP" "cli.org2.example.com" + deleteNewChannelUpdateTx "my-channel2" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel2" "Org2MSP" "cli.org2.example.com" + deleteNewChannelUpdateTx "my-channel3" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel3" "Org2MSP" "cli.org2.example.com" } printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" + printHeadline "Done! Enjoy your fresh network" "U1F984" } stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + printHeadline "Stopping network" "U1F68F" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) sleep 4 } networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + printHeadline "Destroying network" "U1F916" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + printf "Removing chaincode containers & images... \\U1F5D1 \\n" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer0.org2.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org2.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org2.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode2\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer1.org1.example.com-chaincode2" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer1.org1.example.com-chaincode2*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer1.org1.example.com-chaincode2*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer1.org2.example.com-chaincode2\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer1.org2.example.com-chaincode2" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer1.org2.example.com-chaincode2*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer1.org2.example.com-chaincode2*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + printf "Removing generated configs... \\U1F5D1 \\n" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" + printHeadline "Done! Network was purged" "U1F5D1" } " `; @@ -3830,8 +3830,8 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/" networks: - basic @@ -3993,8 +3993,8 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/" networks: - basic @@ -4087,8 +4087,8 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/" networks: - basic @@ -4104,7 +4104,7 @@ services: - DISCOVERY_URLS=grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082 - DISCOVERY_SSL_TARGET_NAME_OVERRIDES= - DISCOVERY_TLS_CA_CERT_FILES=/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt - - HFC_LOGGING={\\"error\\":\\"console\\",\\"warn\\":\\"console\\",\\"info\\":\\"console\\",\\"debug\\":\\"console\\"} + - HFC_LOGGING={"error":"console","warn":"console","info":"console","debug":"console"} volumes: # note: fablo needs access to all anchor peer certs - ../fabric-config/crypto-config/peerOrganizations:/crypto:ro @@ -4123,7 +4123,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7061 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7061 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7061 peer1.org1.example.com:7062" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -4171,7 +4171,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7062 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7062 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7062 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7061 peer1.org1.example.com:7062" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -4264,8 +4264,8 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/" networks: - basic @@ -4279,7 +4279,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7081 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7081 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7081 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7081 peer1.org2.example.com:7082" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -4327,7 +4327,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org2.example.com:7082 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org2.example.com:7082 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7082 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7081 peer1.org2.example.com:7082" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -4380,32 +4380,32 @@ certsGenerate() { local OUTPUT_PATH=$4 local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + echo "Generating certs..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" + inputLog "ORG_PATH: $ORG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -d "$FULL_CERT_PATH" ]; then + echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do + dir=$(dirname "$file") + mv "\${dir}"/*_sk "\${dir}"/priv-key.pem done } @@ -4417,26 +4417,26 @@ genesisBlockCreate() { local GENESIS_PROFILE_NAME=$3 local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + echo "Creating genesis block..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" + inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then + echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + mkdir -p "$OUTPUT_PATH" + docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -4448,27 +4448,27 @@ createChannelTx() { local CONFIG_PATH=$2 local CONFIG_PROFILE=$3 local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + echo "Creating channelTx for $CHANNEL_NAME..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$CHANNEL_TX_PATH" ]; then + echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -4481,34 +4481,34 @@ createNewChannelUpdateTx() { local CONFIG_PROFILE=$3 local CONFIG_PATH=$4 local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then + echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\ + --configPath ./fabric-config \\ + -profile "\${CONFIG_PROFILE}" \\ + -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ + -channelID "\${CHANNEL_NAME}" \\ + -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -4519,24 +4519,24 @@ notifyOrgAboutNewChannel() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -4546,26 +4546,26 @@ notifyOrgAboutNewChannelTls() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + local CA_CERT="/var/hyperledger/cli/"\${6} + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" \\ + --tls --cafile "$CA_CERT" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -4573,58 +4573,58 @@ deleteNewChannelUpdateTx() { local CHANNEL_NAME=$1 local MSP_NAME=$2 local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" + inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' + bold=$'\\e[1m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' + italics=$'\\e[3m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } certsRemove() { local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" + rm -rf "$CERTS_DIR_PATH" } removeContainer() { CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" + docker rm -f "$CONTAINER_NAME" } " `; @@ -4633,46 +4633,46 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro "#!/usr/bin/env bash printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-docker.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-docker.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-docker.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-docker.sh start" + echo -e "\\t Starts already created network." + echo "" + echo "./fabric-docker.sh stop" + echo -e "\\t Stops already running network." + echo "" + echo "./fabric-docker.sh reset" + echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." + echo "" + echo "./fabric-docker.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" } " `; exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. # see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" + local IMAGE="$1" + if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then + docker pull --platform linux/x86_64 "$IMAGE" fi } @@ -4682,61 +4682,61 @@ chaincodeBuild() { local CHAINCODE_DIR_PATH=$3 local RECOMMENDED_NODE_VERSION=$4 - mkdir -p \\"$CHAINCODE_DIR_PATH\\" + mkdir -p "$CHAINCODE_DIR_PATH" # pull required images upfront in case of arm64 (Apple Silicon) architecture # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + if [ "$(uname -m)" = "arm64" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + if [ "$CHAINCODE_LANG" = "java" ]; then + dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + if [ "$CHAINCODE_LANG" = "golang" ]; then + dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) set +e source ~/.nvm/nvm.sh set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" + if [ "$(command -v nvm)" == "nvm" ]; then + current_dir="$(pwd)" + cd "$CHAINCODE_DIR_PATH" set +u nvm install set -u - cd \\"$current_dir\\" + cd "$current_dir" fi fi - NODE_VERSION=\\"$(node --version)\\" + NODE_VERSION="$(node --version)" - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" + USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" + if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then + RECOMMENDED_NODE_VERSION="8.9" fi - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then + echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" + echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) + if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then + (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build && npm install --production) fi fi } @@ -4746,23 +4746,23 @@ chaincodePackage() { local PEER_ADDRESS=$2 local CHAINCODE_NAME=$3 local CHAINCODE_VERSION=$4 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local CHAINCODE_LANG=$5 - echo \\"Packaging chaincode $CHAINCODE_NAME...\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" + echo "Packaging chaincode $CHAINCODE_NAME..." + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CLI_NAME: $CLI_NAME" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode package \\\\ - \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" \\\\ - --path \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - --lang \\"$CHAINCODE_LANG\\" \\\\ - --label \\"$CHAINCODE_LABEL\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode package \\ + "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" \\ + --path "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ + --lang "$CHAINCODE_LANG" \\ + --label "$CHAINCODE_LABEL" # set package owner as current (host) user to fix permission issues - docker exec \\"$CLI_NAME\\" chown \\"$(id -u):$(id -g)\\" \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" + docker exec "$CLI_NAME" chown "$(id -u):$(id -g)" "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" } chaincodeInstall() { @@ -4770,113 +4770,113 @@ chaincodeInstall() { local PEER_ADDRESS=$2 local CHAINCODE_NAME=$3 local CHAINCODE_VERSION=$4 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local CA_CERT=$5 - echo \\"Installing chaincode $CHAINCODE_NAME...\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Installing chaincode $CHAINCODE_NAME..." + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tlsRootCertFiles \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tlsRootCertFiles "/var/hyperledger/cli/$CA_CERT") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode install \\\\ - \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode install \\ + "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeApprove() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - local CHANNEL_NAME=\\"$3\\" + local CHANNEL_NAME="$3" local CHAINCODE_NAME=$4 local CHAINCODE_VERSION=$5 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local ORDERER_URL=$6 local ENDORSEMENT=$7 local INIT_REQUIRED=$8 local CA_CERT=$9 local COLLECTIONS_CONFIG=\${10} - echo \\"Approving chaincode $CHAINCODE_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"INIT_REQUIRED: $INIT_REQUIRED\\" - inputLog \\"CA_CERT: $CA_CERT\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + echo "Approving chaincode $CHAINCODE_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "INIT_REQUIRED: $INIT_REQUIRED" + inputLog "CA_CERT: $CA_CERT" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local ENDORSEMENT_PARAMS=() - if [ -n \\"$ENDORSEMENT\\" ]; then - ENDORSEMENT_PARAMS=(--signature-policy \\"$ENDORSEMENT\\") + if [ -n "$ENDORSEMENT" ]; then + ENDORSEMENT_PARAMS=(--signature-policy "$ENDORSEMENT") fi local INIT_REQUIRED_PARAMS=() - if [ \\"$INIT_REQUIRED\\" = \\"true\\" ]; then + if [ "$INIT_REQUIRED" = "true" ]; then INIT_REQUIRED_PARAMS=(--init-required) fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi local QUERYINSTALLED_RESPONSE local CC_PACKAGE_ID - QUERYINSTALLED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode queryinstalled \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - CC_PACKAGE_ID=\\"$(jq \\".installed_chaincodes | [.[]? | select(.label==\\\\\\"$CHAINCODE_LABEL\\\\\\") ][0].package_id // \\\\\\"\\\\\\"\\" -r <<<\\"$QUERYINSTALLED_RESPONSE\\")\\" - if [ -z \\"$CC_PACKAGE_ID\\" ]; then - CC_PACKAGE_ID=\\"$CHAINCODE_NAME:$CHAINCODE_VERSION\\" + QUERYINSTALLED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode queryinstalled \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + CC_PACKAGE_ID="$(jq ".installed_chaincodes | [.[]? | select(.label==\\"$CHAINCODE_LABEL\\") ][0].package_id // \\"\\"" -r <<<"$QUERYINSTALLED_RESPONSE")" + if [ -z "$CC_PACKAGE_ID" ]; then + CC_PACKAGE_ID="$CHAINCODE_NAME:$CHAINCODE_VERSION" fi - inputLog \\"CC_PACKAGE_ID: $CC_PACKAGE_ID\\" + inputLog "CC_PACKAGE_ID: $CC_PACKAGE_ID" local QUERYCOMMITTED_RESPONSE local SEQUENCE - QUERYCOMMITTED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - SEQUENCE=\\"$(jq \\".chaincode_definitions | [.[]? | select(.name==\\\\\\"$CHAINCODE_NAME\\\\\\").sequence ] | max | select(.!= null)\\" -r <<<\\"$QUERYCOMMITTED_RESPONSE\\")\\" + QUERYCOMMITTED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + SEQUENCE="$(jq ".chaincode_definitions | [.[]? | select(.name==\\"$CHAINCODE_NAME\\").sequence ] | max | select(.!= null)" -r <<<"$QUERYCOMMITTED_RESPONSE")" SEQUENCE=$((SEQUENCE + 1)) - inputLog \\"SEQUENCE: $SEQUENCE\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CC_PACKAGE_ID=\\"$CC_PACKAGE_ID\\" \\"$CLI_NAME\\" peer lifecycle chaincode approveformyorg \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - --package-id \\"$CC_PACKAGE_ID\\" \\\\ - --sequence \\"$SEQUENCE\\" \\\\ - \\"\${ENDORSEMENT_PARAMS[@]+\\"\${ENDORSEMENT_PARAMS[@]}\\"}\\" \\\\ - \\"\${INIT_REQUIRED_PARAMS[@]+\\"\${INIT_REQUIRED_PARAMS[@]}\\"}\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + inputLog "SEQUENCE: $SEQUENCE" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CC_PACKAGE_ID="$CC_PACKAGE_ID" "$CLI_NAME" peer lifecycle chaincode approveformyorg \\ + -o "$ORDERER_URL" \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + --package-id "$CC_PACKAGE_ID" \\ + --sequence "$SEQUENCE" \\ + "\${ENDORSEMENT_PARAMS[@]+"\${ENDORSEMENT_PARAMS[@]}"}" \\ + "\${INIT_REQUIRED_PARAMS[@]+"\${INIT_REQUIRED_PARAMS[@]}"}" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeCommit() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - local CHANNEL_NAME=\\"$3\\" + local CHANNEL_NAME="$3" local CHAINCODE_NAME=$4 local CHAINCODE_VERSION=$5 local ORDERER_URL=$6 @@ -4887,77 +4887,77 @@ chaincodeCommit() { local TLS_ROOT_CERT_FILES=\${11} local COLLECTIONS_CONFIG=\${12} - echo \\"Committing chaincode $CHAINCODE_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"INIT_REQUIRED: $INIT_REQUIRED\\" - inputLog \\"CA_CERT: $CA_CERT\\" - inputLog \\"COMMIT_PEER_ADDRESSES: $COMMIT_PEER_ADDRESSES\\" - inputLog \\"TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + echo "Committing chaincode $CHAINCODE_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "INIT_REQUIRED: $INIT_REQUIRED" + inputLog "CA_CERT: $CA_CERT" + inputLog "COMMIT_PEER_ADDRESSES: $COMMIT_PEER_ADDRESSES" + inputLog "TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COMMIT_PEER_PARAMS=() - if [ -n \\"$COMMIT_PEER_ADDRESSES\\" ]; then + if [ -n "$COMMIT_PEER_ADDRESSES" ]; then # shellcheck disable=SC2207 - COMMIT_PEER_PARAMS=($(echo \\",$COMMIT_PEER_ADDRESSES\\" | sed 's/,/ --peerAddresses /g')) + COMMIT_PEER_PARAMS=($(echo ",$COMMIT_PEER_ADDRESSES" | sed 's/,/ --peerAddresses /g')) fi local TLS_ROOT_CERT_PARAMS=() - if [ -n \\"$TLS_ROOT_CERT_FILES\\" ]; then + if [ -n "$TLS_ROOT_CERT_FILES" ]; then # shellcheck disable=SC2207 - TLS_ROOT_CERT_PARAMS=(--tls $(echo \\",$TLS_ROOT_CERT_FILES\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')) + TLS_ROOT_CERT_PARAMS=(--tls $(echo ",$TLS_ROOT_CERT_FILES" | sed 's/,/ --tlsRootCertFiles \\/var\\/hyperledger\\/cli\\//g')) fi local ENDORSEMENT_PARAMS=() - if [ -n \\"$ENDORSEMENT\\" ]; then - ENDORSEMENT_PARAMS=(--signature-policy \\"$ENDORSEMENT\\") + if [ -n "$ENDORSEMENT" ]; then + ENDORSEMENT_PARAMS=(--signature-policy "$ENDORSEMENT") fi local INIT_REQUIRED_PARAMS=() - if [ \\"$INIT_REQUIRED\\" = \\"true\\" ]; then + if [ "$INIT_REQUIRED" = "true" ]; then INIT_REQUIRED_PARAMS=(--init-required) fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi local QUERYCOMMITTED_RESPONSE local SEQUENCE - QUERYCOMMITTED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - SEQUENCE=\\"$(jq \\".chaincode_definitions | [.[]? | select(.name==\\\\\\"$CHAINCODE_NAME\\\\\\").sequence ] | max | select(.!= null)\\" -r <<<\\"$QUERYCOMMITTED_RESPONSE\\")\\" + QUERYCOMMITTED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + SEQUENCE="$(jq ".chaincode_definitions | [.[]? | select(.name==\\"$CHAINCODE_NAME\\").sequence ] | max | select(.!= null)" -r <<<"$QUERYCOMMITTED_RESPONSE")" SEQUENCE=$((SEQUENCE + 1)) - inputLog \\"SEQUENCE: $SEQUENCE\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode commit \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - --sequence \\"$SEQUENCE\\" \\\\ - \\"\${ENDORSEMENT_PARAMS[@]+\\"\${ENDORSEMENT_PARAMS[@]}\\"}\\" \\\\ - \\"\${INIT_REQUIRED_PARAMS[@]+\\"\${INIT_REQUIRED_PARAMS[@]}\\"}\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${COMMIT_PEER_PARAMS[@]+\\"\${COMMIT_PEER_PARAMS[@]}\\"}\\" \\\\ - \\"\${TLS_ROOT_CERT_PARAMS[@]+\\"\${TLS_ROOT_CERT_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + inputLog "SEQUENCE: $SEQUENCE" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode commit \\ + -o "$ORDERER_URL" \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + --sequence "$SEQUENCE" \\ + "\${ENDORSEMENT_PARAMS[@]+"\${ENDORSEMENT_PARAMS[@]}"}" \\ + "\${INIT_REQUIRED_PARAMS[@]+"\${INIT_REQUIRED_PARAMS[@]}"}" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${COMMIT_PEER_PARAMS[@]+"\${COMMIT_PEER_PARAMS[@]}"}" \\ + "\${TLS_ROOT_CERT_PARAMS[@]+"\${TLS_ROOT_CERT_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } peerChaincodeList() { @@ -4965,13 +4965,13 @@ peerChaincodeList() { local PEER_ADDRESS=$2 local CHANNEL_NAME=$3 - echo \\"Chaincodes list:\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" # Execute the command to list chaincodes - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" } peerChaincodeListTls() { @@ -4980,84 +4980,84 @@ peerChaincodeListTls() { local CHANNEL_NAME=$3 local CA_CERT=$4 - echo \\"Chaincodes list:\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CA_CERT: $CA_CERT" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --tls \\\\ - --cafile \\"/var/hyperledger/cli/$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --tls \\ + --cafile "/var/hyperledger/cli/$CA_CERT" } # Function to perform chaincode invoke peerChaincodeInvoke() { - local CLI=\\"$1\\" - local PEERS=\\"$2\\" - local CHANNEL=\\"$3\\" - local CHAINCODE=\\"$4\\" - local COMMAND=\\"$5\\" - local TRANSIENT=\\"$6\\" - - echo \\"Chaincode invoke:\\" - inputLog \\"CLI: $CLI\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ + docker exec "$CLI" peer chaincode invoke \\ + $PEER_ADDRESSES \\ + -C "$CHANNEL" \\ + -n "$CHAINCODE" \\ + -c "$COMMAND" \\ + --transient "$TRANSIENT" \\ + --waitForEvent \\ + --waitForEventTimeout 90s \\ 2>&1 } # Function to perform chaincode invoke for Tls peerChaincodeInvokeTls() { - local CLI=\\"$1\\" - local PEERS=\\"$2\\" - local CHANNEL=\\"$3\\" - local CHAINCODE=\\"$4\\" - local COMMAND=\\"$5\\" - local TRANSIENT=\\"$6\\" - local PEER_CERTS=\\"$7\\" - local CA_CERT=\\"$8\\" - - echo \\"Chaincode invoke:\\" - inputLog \\"CLI: $CLI\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - inputLog \\"PEER_CERTS: $PEER_CERTS\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - TLS_ROOT_CERT_FILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEER_CERTS\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')\\" + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + local PEER_CERTS="$7" + local CA_CERT="$8" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + inputLog "PEER_CERTS: $PEER_CERTS" + inputLog "CA_CERT: $CA_CERT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" + + TLS_ROOT_CERT_FILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$PEER_CERTS" | sed 's/,/ --tlsRootCertFiles \\/var\\/hyperledger\\/cli\\//g')" # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - $TLS_ROOT_CERT_FILES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - --tls \\\\ - --cafile \\"/var/hyperledger/cli/$CA_CERT\\" \\\\ + docker exec "$CLI" peer chaincode invoke \\ + $PEER_ADDRESSES \\ + $TLS_ROOT_CERT_FILES \\ + -C "$CHANNEL" \\ + -n "$CHAINCODE" \\ + -c "$COMMAND" \\ + --transient "$TRANSIENT" \\ + --waitForEvent \\ + --waitForEventTimeout 90s \\ + --tls \\ + --cafile "/var/hyperledger/cli/$CA_CERT" \\ 2>&1 } " @@ -5070,11 +5070,11 @@ peerChannelList() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list } peerChannelGetInfo() { @@ -5082,13 +5082,13 @@ peerChannelGetInfo() { local CLI_NAME=$2 local PEER_ADDRESS=$3 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" } peerChannelFetchConfig() { @@ -5097,53 +5097,53 @@ peerChannelFetchConfig() { local CONFIG_FILE_NAME=$3 local PEER_ADDRESS=$4 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local TARGET_FILE="$5" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } #=== TLS equivalents ========================================================= @@ -5153,11 +5153,11 @@ peerChannelListTls() { local PEER_ADDRESS=$2 local CA_CERT=$3 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" } peerChannelGetInfoTls() { @@ -5166,13 +5166,13 @@ peerChannelGetInfoTls() { local PEER_ADDRESS=$3 local CA_CERT=$4 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" } peerChannelFetchConfigTls() { @@ -5182,54 +5182,54 @@ peerChannelFetchConfigTls() { local PEER_ADDRESS=$4 local CA_CERT=$5 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local CA_CERT="$5" + local TARGET_FILE="$6" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" + + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } " `; @@ -5244,26 +5244,26 @@ createChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Creating channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx + peer channel join -b "\${CHANNEL_NAME}".block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } createChannelAndJoinTls() { @@ -5271,9 +5271,9 @@ createChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -5282,24 +5282,24 @@ createChannelAndJoinTls() { local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Creating channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoin() { @@ -5307,24 +5307,24 @@ fetchChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Fetching channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" + peer channel join -b "\${CHANNEL_NAME}"_newest.block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoinTls() { @@ -5332,9 +5332,9 @@ fetchChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -5343,22 +5343,22 @@ fetchChannelAndJoinTls() { local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } " `; @@ -5367,7 +5367,7 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro "#!/usr/bin/env bash __getOrdererAndPeerNodes() { - echo \\" + echo " orderer0.group1.orderer1.com orderer1.group1.orderer1.com orderer2.group1.orderer1.com @@ -5376,106 +5376,106 @@ __getOrdererAndPeerNodes() { peer1.org1.example.com peer0.org2.example.com peer1.org2.example.com - \\" + " } __getCASQLiteNodes() { - echo \\" + echo " ca.orderer1.com ca.orderer2.com ca.org1.example.com ca.org2.example.com - \\" + " } __getCAPostgresNodes() { - echo \\" - \\" + echo " + " } __createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + cd "$FABLO_NETWORK_ROOT/.." + backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then + echo "Error: Directory '$backup_dir' already exists and is not empty!" exit 1 fi - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" + mkdir -p "$backup_dir" + cp -R ./fablo-target "$backup_dir/" for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node" + docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" done for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node/pg-data" + docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" done for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + echo "Saving state of $node..." + docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" done } __cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" + cd "$FABLO_NETWORK_ROOT/.." + target_dir="$1" + hook_cmd="$2" - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + if [ -d "$target_dir/fablo-target" ]; then + echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." exit 1 fi - cp -R ./fablo-target \\"$target_dir/fablo-target\\" + cp -R ./fablo-target "$target_dir/fablo-target" - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + if [ -n "$hook_cmd" ]; then + echo "Executing pre-restore hook: '$hook_cmd'" + (cd "$target_dir" && eval "$hook_cmd") fi - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" fi done for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" fi done for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + docker cp "./$node/" "$node:/var/hyperledger/production/" fi done } createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") + (set -eu && __createSnapshot "$1") } cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") + (set -eu && __cloneSnapshot "$1" "$2") } " `; @@ -5484,14 +5484,14 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro "#!/usr/bin/env bash # The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" +echo "Executing post-generate hook" -perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' \\"./fablo-target/fabric-config/configtx.yaml\\" +perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' "./fablo-target/fabric-config/configtx.yaml" " `; exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper files from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` -Array [ +[ "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/.gitignore", "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/configtx.yaml", "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer1.json", diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index e87c73fd..0604d508 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -25,13 +25,13 @@ Channel: &ChannelDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Capabilities: <<: *ChannelCapabilities @@ -47,16 +47,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Writers: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" Admins: Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" + Rule: "OR('OrdererMSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" + Rule: "OR('OrdererMSP.member')" AnchorPeers: @@ -68,16 +68,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" + Rule: "OR('Org1MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org1MSP.member')\\" + Rule: "OR('Org1MSP.member')" AnchorPeers: - Host: peer0.org1.example.com @@ -94,16 +94,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org2MSP.admin')\\" + Rule: "OR('Org2MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org2MSP.member')\\" + Rule: "OR('Org2MSP.member')" AnchorPeers: - Host: peer0.org2.example.com @@ -120,16 +120,16 @@ Organizations: Policies: Readers: Type: Signature - Rule: \\"OR('Org3MSP.member')\\" + Rule: "OR('Org3MSP.member')" Writers: Type: Signature - Rule: \\"OR('Org3MSP.member')\\" + Rule: "OR('Org3MSP.member')" Admins: Type: Signature - Rule: \\"OR('Org3MSP.admin')\\" + Rule: "OR('Org3MSP.admin')" Endorsement: Type: Signature - Rule: \\"OR('Org3MSP.member')\\" + Rule: "OR('Org3MSP.member')" AnchorPeers: - Host: peer0.org3.example.com @@ -149,16 +149,16 @@ Application: &ApplicationDefaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" Endorsement: Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" + Rule: "MAJORITY Endorsement" Capabilities: <<: *ApplicationCapabilities @@ -230,18 +230,18 @@ Orderer: &Group1Defaults Policies: Readers: Type: ImplicitMeta - Rule: \\"ANY Readers\\" + Rule: "ANY Readers" Writers: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Admins: Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" + Rule: "MAJORITY Admins" # BlockValidation specifies what signatures must be included in the block # from the orderer for the peer to validate it. BlockValidation: Type: ImplicitMeta - Rule: \\"ANY Writers\\" + Rule: "ANY Writers" Capabilities: <<: *OrdererCapabilities @@ -343,93 +343,93 @@ Profiles: exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" + "name": "fablo-test-network-orderer", + "description": "Connection profile for Orderer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer" }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\", - \\"peer0.org3.example.com\\", - \\"peer1.org3.example.com\\" + "organizations": { + "Orderer": { + "mspid": "OrdererMSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com", + "peer0.org3.example.com", + "peer1.org3.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" + "certificateAuthorities": [ + "ca.orderer.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7042", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } }, - \\"peer0.org3.example.com\\": { - \\"url\\": \\"grpcs://localhost:7081\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt\\" + "peer0.org3.example.com": { + "url": "grpcs://localhost:7081", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org3.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org3.example.com" } }, - \\"peer1.org3.example.com\\": { - \\"url\\": \\"grpcs://localhost:7082\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt\\" + "peer1.org3.example.com": { + "url": "grpcs://localhost:7082", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org3.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org3.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"https://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.orderer.example.com": { + "url": "https://localhost:7020", + "caName": "ca.orderer.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -512,93 +512,93 @@ certificateAuthorities: exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Org1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1" }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\", - \\"peer0.org3.example.com\\", - \\"peer1.org3.example.com\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com", + "peer0.org3.example.com", + "peer1.org3.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" + "certificateAuthorities": [ + "ca.org1.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7042", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } }, - \\"peer0.org3.example.com\\": { - \\"url\\": \\"grpcs://localhost:7081\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt\\" + "peer0.org3.example.com": { + "url": "grpcs://localhost:7081", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org3.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org3.example.com" } }, - \\"peer1.org3.example.com\\": { - \\"url\\": \\"grpcs://localhost:7082\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt\\" + "peer1.org3.example.com": { + "url": "grpcs://localhost:7082", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org3.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org3.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"https://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.org1.example.com": { + "url": "https://localhost:7040", + "caName": "ca.org1.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -681,93 +681,93 @@ certificateAuthorities: exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Org2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\" + "name": "fablo-test-network-org2", + "description": "Connection profile for Org2 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org2" }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\", - \\"peer0.org3.example.com\\", - \\"peer1.org3.example.com\\" + "organizations": { + "Org2": { + "mspid": "Org2MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com", + "peer0.org3.example.com", + "peer1.org3.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org2.example.com\\" + "certificateAuthorities": [ + "ca.org2.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7042", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } }, - \\"peer0.org3.example.com\\": { - \\"url\\": \\"grpcs://localhost:7081\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt\\" + "peer0.org3.example.com": { + "url": "grpcs://localhost:7081", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org3.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org3.example.com" } }, - \\"peer1.org3.example.com\\": { - \\"url\\": \\"grpcs://localhost:7082\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt\\" + "peer1.org3.example.com": { + "url": "grpcs://localhost:7082", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org3.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org3.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.org2.example.com\\": { - \\"url\\": \\"https://localhost:7060\\", - \\"caName\\": \\"ca.org2.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.org2.example.com": { + "url": "https://localhost:7060", + "caName": "ca.org2.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -850,93 +850,93 @@ certificateAuthorities: exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org3.json from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org3\\", - \\"description\\": \\"Connection profile for Org3 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org3\\" + "name": "fablo-test-network-org3", + "description": "Connection profile for Org3 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org3" }, - \\"organizations\\": { - \\"Org3\\": { - \\"mspid\\": \\"Org3MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\", - \\"peer0.org3.example.com\\", - \\"peer1.org3.example.com\\" + "organizations": { + "Org3": { + "mspid": "Org3MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com", + "peer1.org2.example.com", + "peer0.org3.example.com", + "peer1.org3.example.com" ], - \\"certificateAuthorities\\": [ - \\"ca.org3.example.com\\" + "certificateAuthorities": [ + "ca.org3.example.com" ] } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://localhost:7041", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org1.example.com" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + "peer1.org1.example.com": { + "url": "grpcs://localhost:7042", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org1.example.com" } }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + "peer0.org2.example.com": { + "url": "grpcs://localhost:7061", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org2.example.com" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + "peer1.org2.example.com": { + "url": "grpcs://localhost:7062", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org2.example.com" } }, - \\"peer0.org3.example.com\\": { - \\"url\\": \\"grpcs://localhost:7081\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt\\" + "peer0.org3.example.com": { + "url": "grpcs://localhost:7081", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org3.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer0.org3.example.com" } }, - \\"peer1.org3.example.com\\": { - \\"url\\": \\"grpcs://localhost:7082\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt\\" + "peer1.org3.example.com": { + "url": "grpcs://localhost:7082", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt" }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org3.example.com\\" + "grpcOptions": { + "ssl-target-name-override": "peer1.org3.example.com" } } }, - \\"certificateAuthorities\\": { - \\"ca.org3.example.com\\": { - \\"url\\": \\"https://localhost:7080\\", - \\"caName\\": \\"ca.org3.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/ca/ca.org3.example.com-cert.pem\\" + "certificateAuthorities": { + "ca.org3.example.com": { + "url": "https://localhost:7080", + "caName": "ca.org3.example.com", + "tlsCACerts": { + "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/ca/ca.org3.example.com-cert.pem" }, - \\"httpOptions\\": { - \\"verify\\": false + "httpOptions": { + "verify": false } } } @@ -1075,104 +1075,104 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" }, - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + "network-org2": { + "name": "Network of Org2", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/explorer/config-org1.json from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/explorer/config-org2.json from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "{ - \\"network-configs\\": { - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + "network-configs": { + "network-org2": { + "name": "Network of Org2", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" } }, - \\"license\\": \\"Apache-2.0\\" + "license": "Apache-2.0" } " `; exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/explorer/connection-profile-org1.json from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Hyperledger Explorer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\", - \\"tlsEnable\\": true, - \\"enableAuthentication\\": true, - \\"adminCredential\\": { - \\"id\\": \\"admin\\", - \\"password\\": \\"adminpw\\" + "name": "fablo-test-network-org1", + "description": "Connection profile for Hyperledger Explorer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1", + "tlsEnable": true, + "enableAuthentication": true, + "adminCredential": { + "id": "admin", + "password": "adminpw" }, - \\"connection\\": { - \\"timeout\\": { - \\"peer\\": { - \\"endorser\\": \\"300\\" + "connection": { + "timeout": { + "peer": { + "endorser": "300" }, - \\"orderer\\": \\"300\\" + "orderer": "300" } } }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"adminPrivateKey\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv-key.pem\\" + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "adminPrivateKey": { + "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/priv-key.pem" }, - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\" + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com" ], - \\"signedCert\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem\\" + "signedCert": { + "path": "/tmp/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem" } } }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://peer0.org1.example.com:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem\\" + "peers": { + "peer0.org1.example.com": { + "url": "grpcs://peer0.org1.example.com:7041", + "tlsCACerts": { + "path": "/tmp/crypto/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem" } }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://peer1.org1.example.com:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem\\" + "peer1.org1.example.com": { + "url": "grpcs://peer1.org1.example.com:7042", + "tlsCACerts": { + "path": "/tmp/crypto/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem" } } }, - \\"channels\\": { - \\"my-channel1\\": { - \\"peers\\": {} + "channels": { + "my-channel1": { + "peers": {} }, - \\"my-channel3\\": { - \\"peers\\": {} + "my-channel3": { + "peers": {} } } } @@ -1181,61 +1181,61 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/explorer/connection-profile-org2.json from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Hyperledger Explorer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\", - \\"tlsEnable\\": true, - \\"enableAuthentication\\": true, - \\"adminCredential\\": { - \\"id\\": \\"admin\\", - \\"password\\": \\"adminpw\\" + "name": "fablo-test-network-org2", + "description": "Connection profile for Hyperledger Explorer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org2", + "tlsEnable": true, + "enableAuthentication": true, + "adminCredential": { + "id": "admin", + "password": "adminpw" }, - \\"connection\\": { - \\"timeout\\": { - \\"peer\\": { - \\"endorser\\": \\"300\\" + "connection": { + "timeout": { + "peer": { + "endorser": "300" }, - \\"orderer\\": \\"300\\" + "orderer": "300" } } }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"adminPrivateKey\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/priv-key.pem\\" + "organizations": { + "Org2": { + "mspid": "Org2MSP", + "adminPrivateKey": { + "path": "/tmp/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/priv-key.pem" }, - \\"peers\\": [ - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" + "peers": [ + "peer0.org2.example.com", + "peer1.org2.example.com" ], - \\"signedCert\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem\\" + "signedCert": { + "path": "/tmp/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem" } } }, - \\"peers\\": { - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://peer0.org2.example.com:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem\\" + "peers": { + "peer0.org2.example.com": { + "url": "grpcs://peer0.org2.example.com:7061", + "tlsCACerts": { + "path": "/tmp/crypto/peerOrganizations/org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem" } }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://peer1.org2.example.com:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/tmp/crypto/peerOrganizations/org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem\\" + "peer1.org2.example.com": { + "url": "grpcs://peer1.org2.example.com:7062", + "tlsCACerts": { + "path": "/tmp/crypto/peerOrganizations/org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem" } } }, - \\"channels\\": { - \\"my-channel2\\": { - \\"peers\\": {} + "channels": { + "my-channel2": { + "peers": {} }, - \\"my-channel3\\": { - \\"peers\\": {} + "my-channel3": { + "peers": {} } } } @@ -1256,14 +1256,14 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1271,9 +1271,9 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1291,7 +1291,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1358,11 +1358,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1374,25 +1374,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1413,7 +1413,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1432,11 +1432,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1448,7 +1448,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1456,9 +1456,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1490,18 +1490,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -1530,7 +1530,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -1551,7 +1551,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -1607,7 +1607,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -1635,12 +1635,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -1757,14 +1757,14 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -1772,9 +1772,9 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -1792,7 +1792,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -1859,11 +1859,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -1875,25 +1875,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -1914,7 +1914,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -1933,11 +1933,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -1949,7 +1949,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -1957,9 +1957,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -1991,18 +1991,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -2031,7 +2031,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -2052,7 +2052,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -2108,7 +2108,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -2136,12 +2136,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -2258,14 +2258,14 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -2273,9 +2273,9 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -2293,7 +2293,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -2360,11 +2360,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -2376,25 +2376,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -2415,7 +2415,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -2434,11 +2434,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -2450,7 +2450,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -2458,9 +2458,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -2492,18 +2492,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -2532,7 +2532,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -2553,7 +2553,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -2609,7 +2609,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -2637,12 +2637,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -2759,14 +2759,14 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr # a) --port 443 # To set the listening port # b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# To set the "keyfile" element in the "ca" section below; # note the '.' separator character. # 2) environment variable # Examples: # a) FABRIC_CA_SERVER_PORT=443 # To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; # note the '_' separator character. # 3) configuration file # 4) default value (if there is one) @@ -2774,9 +2774,9 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr # # FILE NAME ELEMENTS # ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# The value of all fields whose name ends with "file" or "files" are # name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# For example, see "tls.certfile" and "tls.clientauth.certfiles". # The value of each of these fields can be a simple filename, a # relative path, or an absolute path. If the value is not an # absolute path, it is interpreted as being relative to the location @@ -2794,7 +2794,7 @@ port: 7054 cors: enabled: false origins: - - \\"*\\" + - "*" # Enables debug logging (default: false) debug: false @@ -2861,11 +2861,11 @@ crl: # chaincode. # There are two main configuration options: # 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# This is true if "ldap.enabled" in the ldap section below is false. # 2) An LDAP server is the registry, in which case the fabric-ca-server # calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. ############################################################################# registry: # Maximum number of times a password/secret can be reused for enrollment @@ -2877,25 +2877,25 @@ registry: - name: admin pass: adminpw type: client - affiliation: \\"\\" + affiliation: "" attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" hf.Revoker: true hf.IntermediateCA: true hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" + hf.Registrar.Attributes: "*" hf.AffiliationMgr: true ############################################################################# # Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# Supported types are: "sqlite3", "postgres", and "mysql". # The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it # may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". ############################################################################# db: type: sqlite3 @@ -2916,7 +2916,7 @@ db: ############################################################################# ldap: # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. + # If this is set to true, the "registry" section is ignored. enabled: false # The URL of the LDAP server url: ldap://:@:/ @@ -2935,11 +2935,11 @@ ldap: # a fabric CA attribute. # For example, the following converts an LDAP 'uid' attribute # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # named "hf.Revoker" with a value of "true" (because the boolean expression # evaluates to true). # converters: # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" + # value: attr("uid") =~ "revoker*" converters: - name: value: @@ -2951,7 +2951,7 @@ ldap: # Further assume the following configuration. # converters: # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") + # value: map(attr("member"),"groups") # maps: # groups: # - name: dn1 @@ -2959,9 +2959,9 @@ ldap: # - name: dn2 # value: client # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". maps: groups: - name: @@ -2993,18 +2993,18 @@ affiliations: ############################################################################# # Signing section # -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. # -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. # A maxpathlen of 0 means that the intermediate CA cannot issue other # intermediate CA certificates, though it can still issue end entity certificates. # (See RFC 5280, section 4.2.1.9) # -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. ############################################################################# signing: default: @@ -3033,7 +3033,7 @@ signing: # Certificate Signing Request (CSR) section. # This controls the creation of the root CA certificate. # The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# "ca.expiry" field below, whose default value is "131400h" which is # 15 years in hours. # The pathlength field is used to limit CA certificate hierarchy as described # in section 4.2.1.9 of RFC 5280. @@ -3054,7 +3054,7 @@ csr: size: 256 names: - C: US - ST: \\"North Carolina\\" + ST: "North Carolina" L: O: Hyperledger OU: Fabric @@ -3110,7 +3110,7 @@ bccsp: # # 1) --cacount # Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# additional CAs are "ca1", "ca2", ... "caN", where "N" is # This is particularly useful in a development environment to quickly set up # multiple CAs. Note that, this config option is not applicable to intermediate CA server # i.e., Fabric CA server that is started with intermediate.parentserver.url config @@ -3138,12 +3138,12 @@ cafiles: # # The relationship between servers and CAs is as follows: # 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. +# This is configured by the "Multi CA section" above. # 2) Each CA is either a root CA or an intermediate CA. # 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. # # This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, +# If the "intermediate.parentserver.url" property is set, # then this is an intermediate CA with the specified parent # CA. # @@ -3251,16 +3251,16 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr set -eu -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/.env" +source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" networkUp() { generateArtifacts @@ -3272,45 +3272,45 @@ networkUp() { printStartSuccessInfo } -if [ \\"$1\\" = \\"up\\" ]; then +if [ "$1" = "up" ]; then networkUp -elif [ \\"$1\\" = \\"down\\" ]; then +elif [ "$1" = "down" ]; then networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then +elif [ "$1" = "reset" ]; then networkDown networkUp -elif [ \\"$1\\" = \\"start\\" ]; then +elif [ "$1" = "start" ]; then startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then +elif [ "$1" = "stop" ]; then stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then + chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then +elif [ "$1" = "--help" ]; then printHelp else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" fi " `; @@ -3361,47 +3361,47 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr "#!/usr/bin/env bash chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $*" exit 1 - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + elif [ "$1" = "peer0.org1.example.com" ]; then - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + [ "$1" = "peer1.org1.example.com" ] then - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + [ "$1" = "peer0.org2.example.com" ] then - peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org2.example.com" "peer0.org2.example.com:7061" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer1.org2.example.com\\" ] + [ "$1" = "peer1.org2.example.com" ] then - peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org2.example.com" "peer1.org2.example.com:7062" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer0.org3.example.com\\" ] + [ "$1" = "peer0.org3.example.com" ] then - peerChaincodeListTls \\"cli.org3.example.com\\" \\"peer0.org3.example.com:7081\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org3.example.com" "peer0.org3.example.com:7081" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name elif - [ \\"$1\\" = \\"peer1.org3.example.com\\" ] + [ "$1" = "peer1.org3.example.com" ] then - peerChaincodeListTls \\"cli.org3.example.com\\" \\"peer1.org3.example.com:7082\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + peerChaincodeListTls "cli.org3.example.com" "peer1.org3.example.com:7082" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name else - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" exit 1 fi @@ -3414,76 +3414,76 @@ chaincodeList() { # 4. chaincode command # 5. transient data (optional) chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" exit 1 fi - cli=\\"\\" - peer_addresses=\\"\\" + cli="" + peer_addresses="" - peer_certs=\\"\\" + peer_certs="" - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + if [[ "$1" == *"peer0.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer0.org1.example.com:7041" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + if [[ "$1" == *"peer1.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer1.org1.example.com:7042" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + if [[ "$1" == *"peer0.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer0.org2.example.com:7061" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" + if [[ "$1" == *"peer1.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer1.org2.example.com:7062" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer0.org3.example.com\\"* ]]; then - cli=\\"cli.org3.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org3.example.com:7081\\" + if [[ "$1" == *"peer0.org3.example.com"* ]]; then + cli="cli.org3.example.com" + peer_addresses="$peer_addresses,peer0.org3.example.com:7081" - peer_certs=\\"$peer_certs,crypto/peers/peer0.org3.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer0.org3.example.com/tls/ca.crt" fi - if [[ \\"$1\\" == *\\"peer1.org3.example.com\\"* ]]; then - cli=\\"cli.org3.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org3.example.com:7082\\" + if [[ "$1" == *"peer1.org3.example.com"* ]]; then + cli="cli.org3.example.com" + peer_addresses="$peer_addresses,peer1.org3.example.com:7082" - peer_certs=\\"$peer_certs,crypto/peers/peer1.org3.example.com/tls/ca.crt\\" + peer_certs="$peer_certs,crypto/peers/peer1.org3.example.com/tls/ca.crt" fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" exit 1 fi - if [ \\"$2\\" = \\"my-channel1\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + if [ "$2" = "my-channel1" ]; then + ca_cert="crypto-orderer/tlsca.orderer.example.com-cert.pem" fi - if [ \\"$2\\" = \\"my-channel2\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + if [ "$2" = "my-channel2" ]; then + ca_cert="crypto-orderer/tlsca.orderer.example.com-cert.pem" fi - if [ \\"$2\\" = \\"my-channel3\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + if [ "$2" = "my-channel3" ]; then + ca_cert="crypto-orderer/tlsca.orderer.example.com-cert.pem" fi - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" + peerChaincodeInvokeTls "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" "\${peer_certs:1}" "$ca_cert" } " @@ -3492,303 +3492,303 @@ chaincodeInvoke() { exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "#!/usr/bin/env bash -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" set -eu channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" + echo "-> Channel query: " + "$@" - if [ \\"$#\\" -eq 1 ]; then + if [ "$#" -eq 1 ]; then printChannelsHelp - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - peerChannelListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] then - peerChannelListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] then - peerChannelListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org2.example.com" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer1" ] then - peerChannelListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org2.example.com" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org3\\" ] && [ \\"$3\\" = \\"peer0\\" ] + [ "$1" = "list" ] && [ "$2" = "org3" ] && [ "$3" = "peer0" ] then - peerChannelListTls \\"cli.org3.example.com\\" \\"peer0.org3.example.com:7081\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org3.example.com" "peer0.org3.example.com:7081" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org3\\" ] && [ \\"$3\\" = \\"peer1\\" ] + [ "$1" = "list" ] && [ "$2" = "org3" ] && [ "$3" = "peer1" ] then - peerChannelListTls \\"cli.org3.example.com\\" \\"peer1.org3.example.com:7082\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelListTls "cli.org3.example.com" "peer1.org3.example.com:7082" "crypto-orderer/tlsca.orderer.example.com-cert.pem" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel1" "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel2" "cli.org2.example.com" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel2" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel2" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org2" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel2" "cli.org2.example.com" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel2" "cli.org2.example.com" "$TARGET_FILE" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel2" "cli.org2.example.com" "\${BLOCK_NAME}" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel3\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel3" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel3" "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel3" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel3" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel3\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel3" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel3" "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel3" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel3\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel3" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel3\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel3" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] then - peerChannelGetInfoTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel3" "cli.org2.example.com" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel3" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel3" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel3\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer1\\" ] + [ "$1" = "getinfo" ] && [ "$2" = "my-channel3" ] && [ "$3" = "org2" ] && [ "$4" = "peer1" ] then - peerChannelGetInfoTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelGetInfoTls "my-channel3" "cli.org2.example.com" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} - peerChannelFetchConfigTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + peerChannelFetchConfigTls "my-channel3" "cli.org2.example.com" "$TARGET_FILE" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel3\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel3" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - peerChannelFetchBlockTls \\"my-channel3\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + peerChannelFetchBlockTls "my-channel3" "cli.org2.example.com" "\${BLOCK_NAME}" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" else - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + echo "$@" + echo "$1, $2, $3, $4, $5, $6, $7, $#" printChannelsHelp fi } printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel list org3 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org3'\\". - echo \\"\\" - - echo \\"fablo channel list org3 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org3'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org2 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org2 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org2 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel3 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel3 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel3 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel3 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel3 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel3 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel3 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel3 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel3 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel3 org2 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel3 org2 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel3 org2 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" + echo "Channel management commands:" + echo "" + + echo "fablo channel list org1 peer0" + echo -e "\\t List channels on 'peer0' of 'Org1'". + echo "" + + echo "fablo channel list org1 peer1" + echo -e "\\t List channels on 'peer1' of 'Org1'". + echo "" + + echo "fablo channel list org2 peer0" + echo -e "\\t List channels on 'peer0' of 'Org2'". + echo "" + + echo "fablo channel list org2 peer1" + echo -e "\\t List channels on 'peer1' of 'Org2'". + echo "" + + echo "fablo channel list org3 peer0" + echo -e "\\t List channels on 'peer0' of 'Org3'". + echo "" + + echo "fablo channel list org3 peer1" + echo -e "\\t List channels on 'peer1' of 'Org3'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel2 org2 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel2 org2 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel2 org2 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel2 org2 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel2 org2 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel2 org2 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel3 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel3 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel3 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel3 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel3 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel3 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel3 org2 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel3 org2 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel3 org2 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel3 org2 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel3 org2 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel3 org2 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'". + echo "" } " @@ -3798,219 +3798,219 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr "#!/usr/bin/env bash generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" + printHeadline "Generating basic configs" "U1F913" - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Orderer" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org2" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating crypto material for Org3\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org3.yaml\\" \\"peerOrganizations/org3.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + printItalics "Generating crypto material for Org3" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org3.yaml" "peerOrganizations/org3.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + printItalics "Generating genesis block for group group1" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" } startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + printHeadline "Starting network" "U1F680" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) sleep 4 } generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - printHeadline \\"Generating config for 'my-channel2'\\" \\"U1F913\\" - createChannelTx \\"my-channel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - printHeadline \\"Generating config for 'my-channel3'\\" \\"U1F913\\" - createChannelTx \\"my-channel3\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel3\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline "Generating config for 'my-channel1'" "U1F913" + createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" + printHeadline "Generating config for 'my-channel2'" "U1F913" + createChannelTx "my-channel2" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config/config" + printHeadline "Generating config for 'my-channel3'" "U1F913" + createChannelTx "my-channel3" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel3" "$FABLO_NETWORK_ROOT/fabric-config/config" } installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - - printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - printHeadline \\"Creating 'my-channel2' on Org2/peer0\\" \\"U1F63B\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - - printItalics \\"Joining 'my-channel2' on Org2/peer1\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - printHeadline \\"Creating 'my-channel3' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel3' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - - printItalics \\"Joining 'my-channel3' on Org1/peer1\\" \\"U1F638\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - printItalics \\"Joining 'my-channel3' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - printItalics \\"Joining 'my-channel3' on Org2/peer1\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + + printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + printHeadline "Creating 'my-channel2' on Org2/peer0" "U1F63B" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + + printItalics "Joining 'my-channel2' on Org2/peer1" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + printHeadline "Creating 'my-channel3' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel3' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + + printItalics "Joining 'my-channel3' on Org1/peer1" "U1F638" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + printItalics "Joining 'my-channel3' on Org2/peer0" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + printItalics "Joining 'my-channel3' on Org2/peer1" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" } installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - local version=\\"0.0.1\\" - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"12\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"peer0.org1.example.com:7041\\" \\"crypto-peer/peer0.org1.example.com/tls/ca.crt\\" \\"\\" + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + local version="0.0.1" + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "12" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "chaincode1" "$version" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "peer0.org1.example.com:7041" "crypto-peer/peer0.org1.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi } installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"12\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"peer0.org1.example.com:7041\\" \\"crypto-peer/peer0.org1.example.com/tls/ca.crt\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "12" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "chaincode1" "$version" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "peer0.org1.example.com:7041" "crypto-peer/peer0.org1.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi fi } runDevModeChaincode() { local chaincodeName=$1 - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - local version=\\"0.0.1\\" - printHeadline \\"Approving 'chaincode1' for Org1 (dev mode)\\" \\"U1F60E\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1' (dev mode)\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"\\" \\"peer0.org1.example.com:7041\\" \\"\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + local version="0.0.1" + printHeadline "Approving 'chaincode1' for Org1 (dev mode)" "U1F60E" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "orderer0.group1.orderer.example.com:7030" "" "false" "" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1' (dev mode)" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "orderer0.group1.orderer.example.com:7030" "" "false" "" "peer0.org1.example.com:7041" "" "" fi } upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" exit 1 fi - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" exit 1 fi - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\")\\" ]; then - printHeadline \\"Packaging chaincode 'chaincode1'\\" \\"U1F60E\\" - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node\\" \\"12\\" - chaincodePackage \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"node\\" printHeadline \\"Installing 'chaincode1' for Org1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"chaincode1\\" \\"$version\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - chaincodeApprove \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - printItalics \\"Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeCommit \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" \\"false\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"peer0.org1.example.com:7041\\" \\"crypto-peer/peer0.org1.example.com/tls/ca.crt\\" \\"\\" + if [ "$chaincodeName" = "chaincode1" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'chaincode1'" "U1F60E" + chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "12" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "node" printHeadline "Installing 'chaincode1' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "chaincode1" "$version" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "chaincode1" "$version" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" + printItalics "Committing chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "orderer0.group1.orderer.example.com:7030" "" "false" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "peer0.org1.example.com:7041" "crypto-peer/peer0.org1.example.com/tls/ca.crt" "" else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'\\" + echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" fi fi } notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel3\\" \\"Org1MSP\\" \\"MyChannel3\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel3\\" \\"Org2MSP\\" \\"MyChannel3\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel3\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel3\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" - deleteNewChannelUpdateTx \\"my-channel3\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel3\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" + printHeadline "Creating new channel config blocks" "U1F537" + createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel2" "Org2MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel3" "Org1MSP" "MyChannel3" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel3" "Org2MSP" "MyChannel3" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + + printHeadline "Notyfing orgs about channels" "U1F4E2" + notifyOrgAboutNewChannelTls "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel2" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel3" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + notifyOrgAboutNewChannelTls "my-channel3" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" + + printHeadline "Deleting new channel config blocks" "U1F52A" + deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel2" "Org2MSP" "cli.org2.example.com" + deleteNewChannelUpdateTx "my-channel3" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel3" "Org2MSP" "cli.org2.example.com" } printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" + printHeadline "Done! Enjoy your fresh network" "U1F984" } stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + printHeadline "Stopping network" "U1F68F" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) sleep 4 } networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + printHeadline "Destroying network" "U1F916" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + printf "Removing chaincode containers & images... \\U1F5D1 \\n" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + for container in $(docker ps -a | grep "dev-peer1.org1.example.com-chaincode1" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" done - for image in $(docker images \\"dev-peer1.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + for image in $(docker images "dev-peer1.org1.example.com-chaincode1*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" done - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + printf "Removing generated configs... \\U1F5D1 \\n" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" + printHeadline "Done! Network was purged" "U1F5D1" } " `; @@ -4080,7 +4080,7 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org3.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org3.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -4212,7 +4212,7 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org3.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org3.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -4296,7 +4296,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -4342,7 +4342,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -4437,7 +4437,7 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org3.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org3.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -4521,7 +4521,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7061 peer1.org2.example.com:7062" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -4567,7 +4567,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org2.example.com:7062 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org2.example.com:7062 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7061 peer1.org2.example.com:7062" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -4662,7 +4662,7 @@ services: - ../fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer0.org3.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org3.example.com/tls/ca.crt:ro - ../fabric-config/crypto-config/peerOrganizations/org3.example.com/peers/peer1.org3.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org3.example.com/tls/ca.crt:ro - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/\\" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/chaincode1/" networks: - basic @@ -4746,7 +4746,7 @@ services: - CORE_PEER_LISTENADDRESS=peer0.org3.example.com:7081 - CORE_PEER_GOSSIP_ENDPOINT=peer0.org3.example.com:7081 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org3.example.com:7081 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org3.example.com:7081 peer1.org3.example.com:7082\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org3.example.com:7081 peer1.org3.example.com:7082" - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org3.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -4792,7 +4792,7 @@ services: - CORE_PEER_LISTENADDRESS=peer1.org3.example.com:7082 - CORE_PEER_GOSSIP_ENDPOINT=peer1.org3.example.com:7082 - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org3.example.com:7082 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org3.example.com:7081 peer1.org3.example.com:7082\\" + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org3.example.com:7081 peer1.org3.example.com:7082" - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org3.example.com:7050 - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} @@ -4837,7 +4837,7 @@ services: - DATABASE_USERNAME=hppoc - DATABASE_PASSWORD=password healthcheck: - test: \\"pg_isready -h localhost -p 5432 -q -U postgres\\" + test: "pg_isready -h localhost -p 5432 -q -U postgres" interval: 5s timeout: 10s retries: 7 @@ -4865,7 +4865,7 @@ services: - ../fabric-config/explorer:/opt/explorer/app/platform/fabric/connection-profile - ../fabric-config/crypto-config:/tmp/crypto ports: - - \\"7010:8080\\" + - "7010:8080" depends_on: db.explorer.example.com: condition: service_healthy @@ -4886,32 +4886,32 @@ certsGenerate() { local OUTPUT_PATH=$4 local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + echo "Generating certs..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" + inputLog "ORG_PATH: $ORG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -d "$FULL_CERT_PATH" ]; then + echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do + dir=$(dirname "$file") + mv "\${dir}"/*_sk "\${dir}"/priv-key.pem done } @@ -4923,26 +4923,26 @@ genesisBlockCreate() { local GENESIS_PROFILE_NAME=$3 local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + echo "Creating genesis block..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" + inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then + echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + mkdir -p "$OUTPUT_PATH" + docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -4954,27 +4954,27 @@ createChannelTx() { local CONFIG_PATH=$2 local CONFIG_PROFILE=$3 local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + echo "Creating channelTx for $CHANNEL_NAME..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + if [ -f "$CHANNEL_TX_PATH" ]; then + echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -4987,34 +4987,34 @@ createNewChannelUpdateTx() { local CONFIG_PROFILE=$3 local CONFIG_PATH=$4 local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then + echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" exit 1 fi - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\ + --configPath ./fabric-config \\ + -profile "\${CONFIG_PROFILE}" \\ + -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ + -channelID "\${CHANNEL_NAME}" \\ + -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME removeContainer $CONTAINER_NAME } @@ -5025,24 +5025,24 @@ notifyOrgAboutNewChannel() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -5052,26 +5052,26 @@ notifyOrgAboutNewChannelTls() { local CLI_NAME=$3 local PEER_ADDRESS=$4 local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + local CA_CERT="/var/hyperledger/cli/"\${6} + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" \\ + --tls --cafile "$CA_CERT" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } @@ -5079,58 +5079,58 @@ deleteNewChannelUpdateTx() { local CHANNEL_NAME=$1 local MSP_NAME=$2 local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" + inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" fi } printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' + bold=$'\\e[1m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' + italics=$'\\e[3m' + end=$'\\e[0m' TEXT=$1 EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" } inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' + end=$'\\e[0m' + darkGray=$'\\e[90m' - echo \\"\${darkGray} $1 \${end}\\" + echo "\${darkGray} $1 \${end}" } certsRemove() { local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" + rm -rf "$CERTS_DIR_PATH" } removeContainer() { CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" + docker rm -f "$CONTAINER_NAME" } " `; @@ -5139,46 +5139,46 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr "#!/usr/bin/env bash printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-docker.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-docker.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-docker.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-docker.sh start" + echo -e "\\t Starts already created network." + echo "" + echo "./fabric-docker.sh stop" + echo -e "\\t Stops already running network." + echo "" + echo "./fabric-docker.sh reset" + echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." + echo "" + echo "./fabric-docker.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" } " `; exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. # see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" + local IMAGE="$1" + if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then + docker pull --platform linux/x86_64 "$IMAGE" fi } @@ -5188,61 +5188,61 @@ chaincodeBuild() { local CHAINCODE_DIR_PATH=$3 local RECOMMENDED_NODE_VERSION=$4 - mkdir -p \\"$CHAINCODE_DIR_PATH\\" + mkdir -p "$CHAINCODE_DIR_PATH" # pull required images upfront in case of arm64 (Apple Silicon) architecture # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + if [ "$(uname -m)" = "arm64" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + if [ "$CHAINCODE_LANG" = "java" ]; then + dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + if [ "$CHAINCODE_LANG" = "golang" ]; then + dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) set +e source ~/.nvm/nvm.sh set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" + if [ "$(command -v nvm)" == "nvm" ]; then + current_dir="$(pwd)" + cd "$CHAINCODE_DIR_PATH" set +u nvm install set -u - cd \\"$current_dir\\" + cd "$current_dir" fi fi - NODE_VERSION=\\"$(node --version)\\" + NODE_VERSION="$(node --version)" - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" + USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" + if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then + RECOMMENDED_NODE_VERSION="8.9" fi - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then + echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" + echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) + if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then + (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build && npm install --production) fi fi } @@ -5252,23 +5252,23 @@ chaincodePackage() { local PEER_ADDRESS=$2 local CHAINCODE_NAME=$3 local CHAINCODE_VERSION=$4 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local CHAINCODE_LANG=$5 - echo \\"Packaging chaincode $CHAINCODE_NAME...\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" + echo "Packaging chaincode $CHAINCODE_NAME..." + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CLI_NAME: $CLI_NAME" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode package \\\\ - \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" \\\\ - --path \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - --lang \\"$CHAINCODE_LANG\\" \\\\ - --label \\"$CHAINCODE_LABEL\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode package \\ + "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" \\ + --path "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ + --lang "$CHAINCODE_LANG" \\ + --label "$CHAINCODE_LABEL" # set package owner as current (host) user to fix permission issues - docker exec \\"$CLI_NAME\\" chown \\"$(id -u):$(id -g)\\" \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" + docker exec "$CLI_NAME" chown "$(id -u):$(id -g)" "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" } chaincodeInstall() { @@ -5276,113 +5276,113 @@ chaincodeInstall() { local PEER_ADDRESS=$2 local CHAINCODE_NAME=$3 local CHAINCODE_VERSION=$4 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local CA_CERT=$5 - echo \\"Installing chaincode $CHAINCODE_NAME...\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Installing chaincode $CHAINCODE_NAME..." + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CA_CERT: $CA_CERT" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tlsRootCertFiles \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tlsRootCertFiles "/var/hyperledger/cli/$CA_CERT") fi - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode install \\\\ - \\"/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode install \\ + "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeApprove() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - local CHANNEL_NAME=\\"$3\\" + local CHANNEL_NAME="$3" local CHAINCODE_NAME=$4 local CHAINCODE_VERSION=$5 - local CHAINCODE_LABEL=\\"\${CHAINCODE_NAME}_$CHAINCODE_VERSION\\" + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" local ORDERER_URL=$6 local ENDORSEMENT=$7 local INIT_REQUIRED=$8 local CA_CERT=$9 local COLLECTIONS_CONFIG=\${10} - echo \\"Approving chaincode $CHAINCODE_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"INIT_REQUIRED: $INIT_REQUIRED\\" - inputLog \\"CA_CERT: $CA_CERT\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + echo "Approving chaincode $CHAINCODE_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "INIT_REQUIRED: $INIT_REQUIRED" + inputLog "CA_CERT: $CA_CERT" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local ENDORSEMENT_PARAMS=() - if [ -n \\"$ENDORSEMENT\\" ]; then - ENDORSEMENT_PARAMS=(--signature-policy \\"$ENDORSEMENT\\") + if [ -n "$ENDORSEMENT" ]; then + ENDORSEMENT_PARAMS=(--signature-policy "$ENDORSEMENT") fi local INIT_REQUIRED_PARAMS=() - if [ \\"$INIT_REQUIRED\\" = \\"true\\" ]; then + if [ "$INIT_REQUIRED" = "true" ]; then INIT_REQUIRED_PARAMS=(--init-required) fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi local QUERYINSTALLED_RESPONSE local CC_PACKAGE_ID - QUERYINSTALLED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode queryinstalled \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - CC_PACKAGE_ID=\\"$(jq \\".installed_chaincodes | [.[]? | select(.label==\\\\\\"$CHAINCODE_LABEL\\\\\\") ][0].package_id // \\\\\\"\\\\\\"\\" -r <<<\\"$QUERYINSTALLED_RESPONSE\\")\\" - if [ -z \\"$CC_PACKAGE_ID\\" ]; then - CC_PACKAGE_ID=\\"$CHAINCODE_NAME:$CHAINCODE_VERSION\\" + QUERYINSTALLED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode queryinstalled \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + CC_PACKAGE_ID="$(jq ".installed_chaincodes | [.[]? | select(.label==\\"$CHAINCODE_LABEL\\") ][0].package_id // \\"\\"" -r <<<"$QUERYINSTALLED_RESPONSE")" + if [ -z "$CC_PACKAGE_ID" ]; then + CC_PACKAGE_ID="$CHAINCODE_NAME:$CHAINCODE_VERSION" fi - inputLog \\"CC_PACKAGE_ID: $CC_PACKAGE_ID\\" + inputLog "CC_PACKAGE_ID: $CC_PACKAGE_ID" local QUERYCOMMITTED_RESPONSE local SEQUENCE - QUERYCOMMITTED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - SEQUENCE=\\"$(jq \\".chaincode_definitions | [.[]? | select(.name==\\\\\\"$CHAINCODE_NAME\\\\\\").sequence ] | max | select(.!= null)\\" -r <<<\\"$QUERYCOMMITTED_RESPONSE\\")\\" + QUERYCOMMITTED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + SEQUENCE="$(jq ".chaincode_definitions | [.[]? | select(.name==\\"$CHAINCODE_NAME\\").sequence ] | max | select(.!= null)" -r <<<"$QUERYCOMMITTED_RESPONSE")" SEQUENCE=$((SEQUENCE + 1)) - inputLog \\"SEQUENCE: $SEQUENCE\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CC_PACKAGE_ID=\\"$CC_PACKAGE_ID\\" \\"$CLI_NAME\\" peer lifecycle chaincode approveformyorg \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - --package-id \\"$CC_PACKAGE_ID\\" \\\\ - --sequence \\"$SEQUENCE\\" \\\\ - \\"\${ENDORSEMENT_PARAMS[@]+\\"\${ENDORSEMENT_PARAMS[@]}\\"}\\" \\\\ - \\"\${INIT_REQUIRED_PARAMS[@]+\\"\${INIT_REQUIRED_PARAMS[@]}\\"}\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + inputLog "SEQUENCE: $SEQUENCE" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CC_PACKAGE_ID="$CC_PACKAGE_ID" "$CLI_NAME" peer lifecycle chaincode approveformyorg \\ + -o "$ORDERER_URL" \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + --package-id "$CC_PACKAGE_ID" \\ + --sequence "$SEQUENCE" \\ + "\${ENDORSEMENT_PARAMS[@]+"\${ENDORSEMENT_PARAMS[@]}"}" \\ + "\${INIT_REQUIRED_PARAMS[@]+"\${INIT_REQUIRED_PARAMS[@]}"}" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } chaincodeCommit() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - local CHANNEL_NAME=\\"$3\\" + local CHANNEL_NAME="$3" local CHAINCODE_NAME=$4 local CHAINCODE_VERSION=$5 local ORDERER_URL=$6 @@ -5393,77 +5393,77 @@ chaincodeCommit() { local TLS_ROOT_CERT_FILES=\${11} local COLLECTIONS_CONFIG=\${12} - echo \\"Committing chaincode $CHAINCODE_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"INIT_REQUIRED: $INIT_REQUIRED\\" - inputLog \\"CA_CERT: $CA_CERT\\" - inputLog \\"COMMIT_PEER_ADDRESSES: $COMMIT_PEER_ADDRESSES\\" - inputLog \\"TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + echo "Committing chaincode $CHAINCODE_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "INIT_REQUIRED: $INIT_REQUIRED" + inputLog "CA_CERT: $CA_CERT" + inputLog "COMMIT_PEER_ADDRESSES: $COMMIT_PEER_ADDRESSES" + inputLog "TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") fi local COMMIT_PEER_PARAMS=() - if [ -n \\"$COMMIT_PEER_ADDRESSES\\" ]; then + if [ -n "$COMMIT_PEER_ADDRESSES" ]; then # shellcheck disable=SC2207 - COMMIT_PEER_PARAMS=($(echo \\",$COMMIT_PEER_ADDRESSES\\" | sed 's/,/ --peerAddresses /g')) + COMMIT_PEER_PARAMS=($(echo ",$COMMIT_PEER_ADDRESSES" | sed 's/,/ --peerAddresses /g')) fi local TLS_ROOT_CERT_PARAMS=() - if [ -n \\"$TLS_ROOT_CERT_FILES\\" ]; then + if [ -n "$TLS_ROOT_CERT_FILES" ]; then # shellcheck disable=SC2207 - TLS_ROOT_CERT_PARAMS=(--tls $(echo \\",$TLS_ROOT_CERT_FILES\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')) + TLS_ROOT_CERT_PARAMS=(--tls $(echo ",$TLS_ROOT_CERT_FILES" | sed 's/,/ --tlsRootCertFiles \\/var\\/hyperledger\\/cli\\//g')) fi local ENDORSEMENT_PARAMS=() - if [ -n \\"$ENDORSEMENT\\" ]; then - ENDORSEMENT_PARAMS=(--signature-policy \\"$ENDORSEMENT\\") + if [ -n "$ENDORSEMENT" ]; then + ENDORSEMENT_PARAMS=(--signature-policy "$ENDORSEMENT") fi local INIT_REQUIRED_PARAMS=() - if [ \\"$INIT_REQUIRED\\" = \\"true\\" ]; then + if [ "$INIT_REQUIRED" = "true" ]; then INIT_REQUIRED_PARAMS=(--init-required) fi local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") fi local QUERYCOMMITTED_RESPONSE local SEQUENCE - QUERYCOMMITTED_RESPONSE=\\"$( - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --output json \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" - )\\" - SEQUENCE=\\"$(jq \\".chaincode_definitions | [.[]? | select(.name==\\\\\\"$CHAINCODE_NAME\\\\\\").sequence ] | max | select(.!= null)\\" -r <<<\\"$QUERYCOMMITTED_RESPONSE\\")\\" + QUERYCOMMITTED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + SEQUENCE="$(jq ".chaincode_definitions | [.[]? | select(.name==\\"$CHAINCODE_NAME\\").sequence ] | max | select(.!= null)" -r <<<"$QUERYCOMMITTED_RESPONSE")" SEQUENCE=$((SEQUENCE + 1)) - inputLog \\"SEQUENCE: $SEQUENCE\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode commit \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - --sequence \\"$SEQUENCE\\" \\\\ - \\"\${ENDORSEMENT_PARAMS[@]+\\"\${ENDORSEMENT_PARAMS[@]}\\"}\\" \\\\ - \\"\${INIT_REQUIRED_PARAMS[@]+\\"\${INIT_REQUIRED_PARAMS[@]}\\"}\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${COMMIT_PEER_PARAMS[@]+\\"\${COMMIT_PEER_PARAMS[@]}\\"}\\" \\\\ - \\"\${TLS_ROOT_CERT_PARAMS[@]+\\"\${TLS_ROOT_CERT_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" + inputLog "SEQUENCE: $SEQUENCE" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode commit \\ + -o "$ORDERER_URL" \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + --sequence "$SEQUENCE" \\ + "\${ENDORSEMENT_PARAMS[@]+"\${ENDORSEMENT_PARAMS[@]}"}" \\ + "\${INIT_REQUIRED_PARAMS[@]+"\${INIT_REQUIRED_PARAMS[@]}"}" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${COMMIT_PEER_PARAMS[@]+"\${COMMIT_PEER_PARAMS[@]}"}" \\ + "\${TLS_ROOT_CERT_PARAMS[@]+"\${TLS_ROOT_CERT_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" } peerChaincodeList() { @@ -5471,13 +5471,13 @@ peerChaincodeList() { local PEER_ADDRESS=$2 local CHANNEL_NAME=$3 - echo \\"Chaincodes list:\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" # Execute the command to list chaincodes - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" } peerChaincodeListTls() { @@ -5486,84 +5486,84 @@ peerChaincodeListTls() { local CHANNEL_NAME=$3 local CA_CERT=$4 - echo \\"Chaincodes list:\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CA_CERT: $CA_CERT" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer lifecycle chaincode querycommitted \\\\ - --channelID \\"$CHANNEL_NAME\\" \\\\ - --tls \\\\ - --cafile \\"/var/hyperledger/cli/$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --tls \\ + --cafile "/var/hyperledger/cli/$CA_CERT" } # Function to perform chaincode invoke peerChaincodeInvoke() { - local CLI=\\"$1\\" - local PEERS=\\"$2\\" - local CHANNEL=\\"$3\\" - local CHAINCODE=\\"$4\\" - local COMMAND=\\"$5\\" - local TRANSIENT=\\"$6\\" - - echo \\"Chaincode invoke:\\" - inputLog \\"CLI: $CLI\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ + docker exec "$CLI" peer chaincode invoke \\ + $PEER_ADDRESSES \\ + -C "$CHANNEL" \\ + -n "$CHAINCODE" \\ + -c "$COMMAND" \\ + --transient "$TRANSIENT" \\ + --waitForEvent \\ + --waitForEventTimeout 90s \\ 2>&1 } # Function to perform chaincode invoke for Tls peerChaincodeInvokeTls() { - local CLI=\\"$1\\" - local PEERS=\\"$2\\" - local CHANNEL=\\"$3\\" - local CHAINCODE=\\"$4\\" - local COMMAND=\\"$5\\" - local TRANSIENT=\\"$6\\" - local PEER_CERTS=\\"$7\\" - local CA_CERT=\\"$8\\" - - echo \\"Chaincode invoke:\\" - inputLog \\"CLI: $CLI\\" - inputLog \\"PEERS: $PEERS\\" - inputLog \\"CHANNEL: $CHANNEL\\" - inputLog \\"CHAINCODE: $CHAINCODE\\" - inputLog \\"COMMAND: $COMMAND\\" - inputLog \\"TRANSIENT: $TRANSIENT\\" - inputLog \\"PEER_CERTS: $PEER_CERTS\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - PEER_ADDRESSES=\\"--peerAddresses $(echo \\"$PEERS\\" | sed 's/,/ --peerAddresses /g')\\" - - TLS_ROOT_CERT_FILES=\\"--tlsRootCertFiles /var/hyperledger/cli/$(echo \\"$PEER_CERTS\\" | sed 's/,/ --tlsRootCertFiles \\\\/var\\\\/hyperledger\\\\/cli\\\\//g')\\" + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + local PEER_CERTS="$7" + local CA_CERT="$8" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + inputLog "PEER_CERTS: $PEER_CERTS" + inputLog "CA_CERT: $CA_CERT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" + + TLS_ROOT_CERT_FILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$PEER_CERTS" | sed 's/,/ --tlsRootCertFiles \\/var\\/hyperledger\\/cli\\//g')" # shellcheck disable=SC2086 - docker exec \\"$CLI\\" peer chaincode invoke \\\\ - $PEER_ADDRESSES \\\\ - $TLS_ROOT_CERT_FILES \\\\ - -C \\"$CHANNEL\\" \\\\ - -n \\"$CHAINCODE\\" \\\\ - -c \\"$COMMAND\\" \\\\ - --transient \\"$TRANSIENT\\" \\\\ - --waitForEvent \\\\ - --waitForEventTimeout 90s \\\\ - --tls \\\\ - --cafile \\"/var/hyperledger/cli/$CA_CERT\\" \\\\ + docker exec "$CLI" peer chaincode invoke \\ + $PEER_ADDRESSES \\ + $TLS_ROOT_CERT_FILES \\ + -C "$CHANNEL" \\ + -n "$CHAINCODE" \\ + -c "$COMMAND" \\ + --transient "$TRANSIENT" \\ + --waitForEvent \\ + --waitForEventTimeout 90s \\ + --tls \\ + --cafile "/var/hyperledger/cli/$CA_CERT" \\ 2>&1 } " @@ -5576,11 +5576,11 @@ peerChannelList() { local CLI_NAME=$1 local PEER_ADDRESS=$2 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list } peerChannelGetInfo() { @@ -5588,13 +5588,13 @@ peerChannelGetInfo() { local CLI_NAME=$2 local PEER_ADDRESS=$3 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" } peerChannelFetchConfig() { @@ -5603,53 +5603,53 @@ peerChannelFetchConfig() { local CONFIG_FILE_NAME=$3 local PEER_ADDRESS=$4 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local TARGET_FILE="$5" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } #=== TLS equivalents ========================================================= @@ -5659,11 +5659,11 @@ peerChannelListTls() { local PEER_ADDRESS=$2 local CA_CERT=$3 - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" } peerChannelGetInfoTls() { @@ -5672,13 +5672,13 @@ peerChannelGetInfoTls() { local PEER_ADDRESS=$3 local CA_CERT=$4 - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" } peerChannelFetchConfigTls() { @@ -5688,54 +5688,54 @@ peerChannelFetchConfigTls() { local PEER_ADDRESS=$4 local CA_CERT=$5 - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ } peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local CA_CERT="$5" + local TARGET_FILE="$6" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" + + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ } " `; @@ -5750,26 +5750,26 @@ createChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Creating channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx + peer channel join -b "\${CHANNEL_NAME}".block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } createChannelAndJoinTls() { @@ -5777,9 +5777,9 @@ createChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -5788,24 +5788,24 @@ createChannelAndJoinTls() { local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Creating channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoin() { @@ -5813,24 +5813,24 @@ fetchChannelAndJoin() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") local ORDERER_URL=$5 local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo "Fetching channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" + peer channel join -b "\${CHANNEL_NAME}"_newest.block - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } fetchChannelAndJoinTls() { @@ -5838,9 +5838,9 @@ fetchChannelAndJoinTls() { local CORE_PEER_LOCALMSPID=$2 local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") local ORDERER_URL=$7 local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt @@ -5849,22 +5849,22 @@ fetchChannelAndJoinTls() { local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + mkdir "$DIR_NAME" && cd "$DIR_NAME" - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - rm -rf \\"$DIR_NAME\\" + rm -rf "$DIR_NAME" } " `; @@ -5873,7 +5873,7 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr "#!/usr/bin/env bash __getOrdererAndPeerNodes() { - echo \\" + echo " orderer0.group1.orderer.example.com orderer1.group1.orderer.example.com orderer0.group1.org1.example.com @@ -5888,106 +5888,106 @@ __getOrdererAndPeerNodes() { orderer1.group1.org3.example.com peer0.org3.example.com peer1.org3.example.com - \\" + " } __getCASQLiteNodes() { - echo \\" + echo " ca.orderer.example.com ca.org1.example.com ca.org2.example.com ca.org3.example.com - \\" + " } __getCAPostgresNodes() { - echo \\" - \\" + echo " + " } __createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + cd "$FABLO_NETWORK_ROOT/.." + backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then + echo "Error: Directory '$backup_dir' already exists and is not empty!" exit 1 fi - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" + mkdir -p "$backup_dir" + cp -R ./fablo-target "$backup_dir/" for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node" + docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" done for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node/pg-data" + docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" done for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + echo "Saving state of $node..." + docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" done } __cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" + cd "$FABLO_NETWORK_ROOT/.." + target_dir="$1" + hook_cmd="$2" - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + if [ -d "$target_dir/fablo-target" ]; then + echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." exit 1 fi - cp -R ./fablo-target \\"$target_dir/fablo-target\\" + cp -R ./fablo-target "$target_dir/fablo-target" - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + if [ -n "$hook_cmd" ]; then + echo "Executing pre-restore hook: '$hook_cmd'" + (cd "$target_dir" && eval "$hook_cmd") fi - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" fi done for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" fi done for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + docker cp "./$node/" "$node:/var/hyperledger/production/" fi done } createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") + (set -eu && __createSnapshot "$1") } cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") + (set -eu && __cloneSnapshot "$1" "$2") } " `; @@ -5996,12 +5996,12 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr "#!/usr/bin/env bash # The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" +echo "Executing post-generate hook" " `; exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper files from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` -Array [ +[ "e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/.gitignore", "e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/configtx.yaml", "e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", diff --git a/e2e/__snapshots__/fabloCommands.test.ts.snap b/e2e/__snapshots__/fabloCommands.test.ts.snap index cdb19045..bfdf6f6c 100644 --- a/e2e/__snapshots__/fabloCommands.test.ts.snap +++ b/e2e/__snapshots__/fabloCommands.test.ts.snap @@ -5,2415 +5,2415 @@ exports[`extend config should extend custom config 1`] = ` Validation warnings count: 0 =========================================================== { - \\"global\\": { - \\"fabricVersion\\": \\"2.4.3\\", - \\"tls\\": true, - \\"monitoring\\": { - \\"loglevel\\": \\"debug\\" + "global": { + "fabricVersion": "2.4.3", + "tls": true, + "monitoring": { + "loglevel": "debug" }, - \\"fabricCaVersion\\": \\"1.5.5\\", - \\"fabricCcenvVersion\\": \\"2.4.3\\", - \\"fabricBaseosVersion\\": \\"2.4.3\\", - \\"fabricJavaenvVersion\\": \\"2.4\\", - \\"fabricNodeenvVersion\\": \\"2.4\\", - \\"fabricRecommendedNodeVersion\\": \\"16\\", - \\"engine\\": \\"docker\\", - \\"paths\\": { - \\"fabloConfig\\": \\"\\", - \\"chaincodesBaseDir\\": \\"\\" + "fabricCaVersion": "1.5.5", + "fabricCcenvVersion": "2.4.3", + "fabricBaseosVersion": "2.4.3", + "fabricJavaenvVersion": "2.4", + "fabricNodeenvVersion": "2.4", + "fabricRecommendedNodeVersion": "16", + "engine": "docker", + "paths": { + "fabloConfig": "", + "chaincodesBaseDir": "" }, - \\"capabilities\\": { - \\"channel\\": \\"V2_0\\", - \\"orderer\\": \\"V2_0\\", - \\"application\\": \\"V2_0\\", - \\"isV2\\": true + "capabilities": { + "channel": "V2_0", + "orderer": "V2_0", + "application": "V2_0", + "isV2": true }, - \\"tools\\": {} + "tools": {} }, - \\"ordererGroups\\": [ + "ordererGroups": [ { - \\"name\\": \\"group1\\", - \\"consensus\\": \\"etcdraft\\", - \\"configtxOrdererDefaults\\": \\"Group1Defaults\\", - \\"profileName\\": \\"Group1Genesis\\", - \\"genesisBlockName\\": \\"Group1Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer1\\" + "name": "group1", + "consensus": "etcdraft", + "configtxOrdererDefaults": "Group1Defaults", + "profileName": "Group1Genesis", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer1" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, { - \\"name\\": \\"orderer1.group1\\", - \\"address\\": \\"orderer1.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7031, - \\"fullAddress\\": \\"orderer1.group1.orderer1.com:7031\\" + "name": "orderer1.group1", + "address": "orderer1.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7031, + "fullAddress": "orderer1.group1.orderer1.com:7031" }, { - \\"name\\": \\"orderer2.group1\\", - \\"address\\": \\"orderer2.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7032, - \\"fullAddress\\": \\"orderer2.group1.orderer1.com:7032\\" + "name": "orderer2.group1", + "address": "orderer2.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7032, + "fullAddress": "orderer2.group1.orderer1.com:7032" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } ], - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } }, { - \\"name\\": \\"group2\\", - \\"consensus\\": \\"solo\\", - \\"configtxOrdererDefaults\\": \\"Group2Defaults\\", - \\"profileName\\": \\"Group2Genesis\\", - \\"genesisBlockName\\": \\"Group2Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer2\\" + "name": "group2", + "consensus": "solo", + "configtxOrdererDefaults": "Group2Defaults", + "profileName": "Group2Genesis", + "genesisBlockName": "Group2Genesis.block", + "hostingOrgs": [ + "Orderer2" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group2\\", - \\"address\\": \\"orderer0.group2.orderer2.com\\", - \\"orgName\\": \\"Orderer2\\", - \\"orgMspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7050, - \\"fullAddress\\": \\"orderer0.group2.orderer2.com:7050\\" + "name": "orderer0.group2", + "address": "orderer0.group2.orderer2.com", + "orgName": "Orderer2", + "orgMspName": "Orderer2MSP", + "domain": "orderer2.com", + "consensus": "solo", + "port": 7050, + "fullAddress": "orderer0.group2.orderer2.com:7050" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group2\\", - \\"address\\": \\"orderer0.group2.orderer2.com\\", - \\"orgName\\": \\"Orderer2\\", - \\"orgMspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7050, - \\"fullAddress\\": \\"orderer0.group2.orderer2.com:7050\\" + "name": "orderer0.group2", + "address": "orderer0.group2.orderer2.com", + "orgName": "Orderer2", + "orgMspName": "Orderer2MSP", + "domain": "orderer2.com", + "consensus": "solo", + "port": 7050, + "fullAddress": "orderer0.group2.orderer2.com:7050" } ], - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group2\\", - \\"address\\": \\"orderer0.group2.orderer2.com\\", - \\"orgName\\": \\"Orderer2\\", - \\"orgMspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7050, - \\"fullAddress\\": \\"orderer0.group2.orderer2.com:7050\\" + "ordererHead": { + "name": "orderer0.group2", + "address": "orderer0.group2.orderer2.com", + "orgName": "Orderer2", + "orgMspName": "Orderer2MSP", + "domain": "orderer2.com", + "consensus": "solo", + "port": 7050, + "fullAddress": "orderer0.group2.orderer2.com:7050" } } ], - \\"orderedHeadsDistinct\\": [ + "orderedHeadsDistinct": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, { - \\"name\\": \\"orderer0.group2\\", - \\"address\\": \\"orderer0.group2.orderer2.com\\", - \\"orgName\\": \\"Orderer2\\", - \\"orgMspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7050, - \\"fullAddress\\": \\"orderer0.group2.orderer2.com:7050\\" + "name": "orderer0.group2", + "address": "orderer0.group2.orderer2.com", + "orgName": "Orderer2", + "orgMspName": "Orderer2MSP", + "domain": "orderer2.com", + "consensus": "solo", + "port": 7050, + "fullAddress": "orderer0.group2.orderer2.com:7050" } ], - \\"orgs\\": [ + "orgs": [ { - \\"name\\": \\"Orderer1\\", - \\"mspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-orderer1\\", - \\"peersCount\\": 0, - \\"peers\\": [], - \\"anchorPeers\\": [], - \\"bootstrapPeers\\": \\"\\\\\\"\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.orderer1.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7020, - \\"fullAddress\\": \\"ca.orderer1.com:7054\\", - \\"caAdminNameVar\\": \\"ORDERER1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORDERER1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "name": "Orderer1", + "mspName": "Orderer1MSP", + "domain": "orderer1.com", + "cryptoConfigFileName": "crypto-config-orderer1", + "peersCount": 0, + "peers": [], + "anchorPeers": [], + "bootstrapPeers": "\\"\\"", + "ca": { + "prefix": "ca", + "address": "ca.orderer1.com", + "port": 7054, + "exposePort": 7020, + "fullAddress": "ca.orderer1.com:7054", + "caAdminNameVar": "ORDERER1_CA_ADMIN_NAME", + "caAdminPassVar": "ORDERER1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.orderer1.com\\" + "cli": { + "address": "cli.orderer1.com" }, - \\"ordererGroups\\": [ + "ordererGroups": [ { - \\"name\\": \\"group1\\", - \\"consensus\\": \\"etcdraft\\", - \\"configtxOrdererDefaults\\": \\"Group1Defaults\\", - \\"profileName\\": \\"Group1Genesis\\", - \\"genesisBlockName\\": \\"Group1Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer1\\" + "name": "group1", + "consensus": "etcdraft", + "configtxOrdererDefaults": "Group1Defaults", + "profileName": "Group1Genesis", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer1" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, { - \\"name\\": \\"orderer1.group1\\", - \\"address\\": \\"orderer1.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7031, - \\"fullAddress\\": \\"orderer1.group1.orderer1.com:7031\\" + "name": "orderer1.group1", + "address": "orderer1.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7031, + "fullAddress": "orderer1.group1.orderer1.com:7031" }, { - \\"name\\": \\"orderer2.group1\\", - \\"address\\": \\"orderer2.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7032, - \\"fullAddress\\": \\"orderer2.group1.orderer1.com:7032\\" + "name": "orderer2.group1", + "address": "orderer2.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7032, + "fullAddress": "orderer2.group1.orderer1.com:7032" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } ] } ], - \\"tools\\": {} + "tools": {} }, { - \\"name\\": \\"Orderer2\\", - \\"mspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-orderer2\\", - \\"peersCount\\": 0, - \\"peers\\": [], - \\"anchorPeers\\": [], - \\"bootstrapPeers\\": \\"\\\\\\"\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.orderer2.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7040, - \\"fullAddress\\": \\"ca.orderer2.com:7054\\", - \\"caAdminNameVar\\": \\"ORDERER2_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORDERER2_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "name": "Orderer2", + "mspName": "Orderer2MSP", + "domain": "orderer2.com", + "cryptoConfigFileName": "crypto-config-orderer2", + "peersCount": 0, + "peers": [], + "anchorPeers": [], + "bootstrapPeers": "\\"\\"", + "ca": { + "prefix": "ca", + "address": "ca.orderer2.com", + "port": 7054, + "exposePort": 7040, + "fullAddress": "ca.orderer2.com:7054", + "caAdminNameVar": "ORDERER2_CA_ADMIN_NAME", + "caAdminPassVar": "ORDERER2_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.orderer2.com\\" + "cli": { + "address": "cli.orderer2.com" }, - \\"ordererGroups\\": [ + "ordererGroups": [ { - \\"name\\": \\"group2\\", - \\"consensus\\": \\"solo\\", - \\"configtxOrdererDefaults\\": \\"Group2Defaults\\", - \\"profileName\\": \\"Group2Genesis\\", - \\"genesisBlockName\\": \\"Group2Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer2\\" + "name": "group2", + "consensus": "solo", + "configtxOrdererDefaults": "Group2Defaults", + "profileName": "Group2Genesis", + "genesisBlockName": "Group2Genesis.block", + "hostingOrgs": [ + "Orderer2" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group2\\", - \\"address\\": \\"orderer0.group2.orderer2.com\\", - \\"orgName\\": \\"Orderer2\\", - \\"orgMspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7050, - \\"fullAddress\\": \\"orderer0.group2.orderer2.com:7050\\" + "name": "orderer0.group2", + "address": "orderer0.group2.orderer2.com", + "orgName": "Orderer2", + "orgMspName": "Orderer2MSP", + "domain": "orderer2.com", + "consensus": "solo", + "port": 7050, + "fullAddress": "orderer0.group2.orderer2.com:7050" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group2\\", - \\"address\\": \\"orderer0.group2.orderer2.com\\", - \\"orgName\\": \\"Orderer2\\", - \\"orgMspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7050, - \\"fullAddress\\": \\"orderer0.group2.orderer2.com:7050\\" + "name": "orderer0.group2", + "address": "orderer0.group2.orderer2.com", + "orgName": "Orderer2", + "orgMspName": "Orderer2MSP", + "domain": "orderer2.com", + "consensus": "solo", + "port": 7050, + "fullAddress": "orderer0.group2.orderer2.com:7050" } ] } ], - \\"tools\\": {} + "tools": {} }, { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } }, { - \\"name\\": \\"Org2\\", - \\"mspName\\": \\"Org2MSP\\", - \\"domain\\": \\"org2.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org2\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org2", + "mspName": "Org2MSP", + "domain": "org2.example.com", + "cryptoConfigFileName": "crypto-config-org2", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org2.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7080, - \\"fullAddress\\": \\"ca.org2.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG2_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG2_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", + "ca": { + "prefix": "ca", + "address": "ca.org2.example.com", + "port": 7054, + "exposePort": 7080, + "fullAddress": "ca.org2.example.com:7054", + "caAdminNameVar": "ORG2_CA_ADMIN_NAME", + "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org2.example.com\\" + "cli": { + "address": "cli.org2.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": {} + "ordererGroups": [], + "tools": {} } ], - \\"channels\\": [ + "channels": [ { - \\"name\\": \\"my-channel1\\", - \\"profileName\\": \\"MyChannel1\\", - \\"orgs\\": [ + "name": "my-channel1", + "profileName": "MyChannel1", + "orgs": [ { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } }, { - \\"name\\": \\"Org2\\", - \\"mspName\\": \\"Org2MSP\\", - \\"domain\\": \\"org2.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org2\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org2", + "mspName": "Org2MSP", + "domain": "org2.example.com", + "cryptoConfigFileName": "crypto-config-org2", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org2.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7080, - \\"fullAddress\\": \\"ca.org2.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG2_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG2_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", + "ca": { + "prefix": "ca", + "address": "ca.org2.example.com", + "port": 7054, + "exposePort": 7080, + "fullAddress": "ca.org2.example.com:7054", + "caAdminNameVar": "ORG2_CA_ADMIN_NAME", + "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org2.example.com\\" + "cli": { + "address": "cli.org2.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": {} + "ordererGroups": [], + "tools": {} } ], - \\"ordererGroup\\": { - \\"name\\": \\"group1\\", - \\"consensus\\": \\"etcdraft\\", - \\"configtxOrdererDefaults\\": \\"Group1Defaults\\", - \\"profileName\\": \\"Group1Genesis\\", - \\"genesisBlockName\\": \\"Group1Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer1\\" + "ordererGroup": { + "name": "group1", + "consensus": "etcdraft", + "configtxOrdererDefaults": "Group1Defaults", + "profileName": "Group1Genesis", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer1" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, { - \\"name\\": \\"orderer1.group1\\", - \\"address\\": \\"orderer1.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7031, - \\"fullAddress\\": \\"orderer1.group1.orderer1.com:7031\\" + "name": "orderer1.group1", + "address": "orderer1.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7031, + "fullAddress": "orderer1.group1.orderer1.com:7031" }, { - \\"name\\": \\"orderer2.group1\\", - \\"address\\": \\"orderer2.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7032, - \\"fullAddress\\": \\"orderer2.group1.orderer1.com:7032\\" + "name": "orderer2.group1", + "address": "orderer2.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7032, + "fullAddress": "orderer2.group1.orderer1.com:7032" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } ], - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } }, - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, - \\"instantiatingOrg\\": { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "instantiatingOrg": { + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } } }, { - \\"name\\": \\"my-channel2\\", - \\"profileName\\": \\"MyChannel2\\", - \\"orgs\\": [ + "name": "my-channel2", + "profileName": "MyChannel2", + "orgs": [ { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } }, { - \\"name\\": \\"Org2\\", - \\"mspName\\": \\"Org2MSP\\", - \\"domain\\": \\"org2.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org2\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org2", + "mspName": "Org2MSP", + "domain": "org2.example.com", + "cryptoConfigFileName": "crypto-config-org2", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org2.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7080, - \\"fullAddress\\": \\"ca.org2.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG2_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG2_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", + "ca": { + "prefix": "ca", + "address": "ca.org2.example.com", + "port": 7054, + "exposePort": 7080, + "fullAddress": "ca.org2.example.com:7054", + "caAdminNameVar": "ORG2_CA_ADMIN_NAME", + "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org2.example.com\\" + "cli": { + "address": "cli.org2.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": {} + "ordererGroups": [], + "tools": {} } ], - \\"ordererGroup\\": { - \\"name\\": \\"group1\\", - \\"consensus\\": \\"etcdraft\\", - \\"configtxOrdererDefaults\\": \\"Group1Defaults\\", - \\"profileName\\": \\"Group1Genesis\\", - \\"genesisBlockName\\": \\"Group1Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer1\\" + "ordererGroup": { + "name": "group1", + "consensus": "etcdraft", + "configtxOrdererDefaults": "Group1Defaults", + "profileName": "Group1Genesis", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer1" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, { - \\"name\\": \\"orderer1.group1\\", - \\"address\\": \\"orderer1.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7031, - \\"fullAddress\\": \\"orderer1.group1.orderer1.com:7031\\" + "name": "orderer1.group1", + "address": "orderer1.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7031, + "fullAddress": "orderer1.group1.orderer1.com:7031" }, { - \\"name\\": \\"orderer2.group1\\", - \\"address\\": \\"orderer2.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7032, - \\"fullAddress\\": \\"orderer2.group1.orderer1.com:7032\\" + "name": "orderer2.group1", + "address": "orderer2.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7032, + "fullAddress": "orderer2.group1.orderer1.com:7032" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } ], - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } }, - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, - \\"instantiatingOrg\\": { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "instantiatingOrg": { + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } } }, { - \\"name\\": \\"my-channel3\\", - \\"profileName\\": \\"MyChannel3\\", - \\"orgs\\": [ + "name": "my-channel3", + "profileName": "MyChannel3", + "orgs": [ { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } }, { - \\"name\\": \\"Org2\\", - \\"mspName\\": \\"Org2MSP\\", - \\"domain\\": \\"org2.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org2\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org2", + "mspName": "Org2MSP", + "domain": "org2.example.com", + "cryptoConfigFileName": "crypto-config-org2", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org2.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7080, - \\"fullAddress\\": \\"ca.org2.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG2_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG2_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", + "ca": { + "prefix": "ca", + "address": "ca.org2.example.com", + "port": 7054, + "exposePort": 7080, + "fullAddress": "ca.org2.example.com:7054", + "caAdminNameVar": "ORG2_CA_ADMIN_NAME", + "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org2.example.com\\" + "cli": { + "address": "cli.org2.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": {} + "ordererGroups": [], + "tools": {} } ], - \\"ordererGroup\\": { - \\"name\\": \\"group2\\", - \\"consensus\\": \\"solo\\", - \\"configtxOrdererDefaults\\": \\"Group2Defaults\\", - \\"profileName\\": \\"Group2Genesis\\", - \\"genesisBlockName\\": \\"Group2Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer2\\" + "ordererGroup": { + "name": "group2", + "consensus": "solo", + "configtxOrdererDefaults": "Group2Defaults", + "profileName": "Group2Genesis", + "genesisBlockName": "Group2Genesis.block", + "hostingOrgs": [ + "Orderer2" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group2\\", - \\"address\\": \\"orderer0.group2.orderer2.com\\", - \\"orgName\\": \\"Orderer2\\", - \\"orgMspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7050, - \\"fullAddress\\": \\"orderer0.group2.orderer2.com:7050\\" + "name": "orderer0.group2", + "address": "orderer0.group2.orderer2.com", + "orgName": "Orderer2", + "orgMspName": "Orderer2MSP", + "domain": "orderer2.com", + "consensus": "solo", + "port": 7050, + "fullAddress": "orderer0.group2.orderer2.com:7050" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group2\\", - \\"address\\": \\"orderer0.group2.orderer2.com\\", - \\"orgName\\": \\"Orderer2\\", - \\"orgMspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7050, - \\"fullAddress\\": \\"orderer0.group2.orderer2.com:7050\\" + "name": "orderer0.group2", + "address": "orderer0.group2.orderer2.com", + "orgName": "Orderer2", + "orgMspName": "Orderer2MSP", + "domain": "orderer2.com", + "consensus": "solo", + "port": 7050, + "fullAddress": "orderer0.group2.orderer2.com:7050" } ], - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group2\\", - \\"address\\": \\"orderer0.group2.orderer2.com\\", - \\"orgName\\": \\"Orderer2\\", - \\"orgMspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7050, - \\"fullAddress\\": \\"orderer0.group2.orderer2.com:7050\\" + "ordererHead": { + "name": "orderer0.group2", + "address": "orderer0.group2.orderer2.com", + "orgName": "Orderer2", + "orgMspName": "Orderer2MSP", + "domain": "orderer2.com", + "consensus": "solo", + "port": 7050, + "fullAddress": "orderer0.group2.orderer2.com:7050" } }, - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group2\\", - \\"address\\": \\"orderer0.group2.orderer2.com\\", - \\"orgName\\": \\"Orderer2\\", - \\"orgMspName\\": \\"Orderer2MSP\\", - \\"domain\\": \\"orderer2.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7050, - \\"fullAddress\\": \\"orderer0.group2.orderer2.com:7050\\" + "ordererHead": { + "name": "orderer0.group2", + "address": "orderer0.group2.orderer2.com", + "orgName": "Orderer2", + "orgMspName": "Orderer2MSP", + "domain": "orderer2.com", + "consensus": "solo", + "port": 7050, + "fullAddress": "orderer0.group2.orderer2.com:7050" }, - \\"instantiatingOrg\\": { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "instantiatingOrg": { + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } } } ], - \\"chaincodes\\": [ + "chaincodes": [ { - \\"directory\\": \\"./chaincodes/chaincode-kv-node\\", - \\"name\\": \\"chaincode1\\", - \\"version\\": \\"0.0.1\\", - \\"lang\\": \\"node\\", - \\"channel\\": { - \\"name\\": \\"my-channel1\\", - \\"profileName\\": \\"MyChannel1\\", - \\"orgs\\": [ + "directory": "./chaincodes/chaincode-kv-node", + "name": "chaincode1", + "version": "0.0.1", + "lang": "node", + "channel": { + "name": "my-channel1", + "profileName": "MyChannel1", + "orgs": [ { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } }, { - \\"name\\": \\"Org2\\", - \\"mspName\\": \\"Org2MSP\\", - \\"domain\\": \\"org2.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org2\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org2", + "mspName": "Org2MSP", + "domain": "org2.example.com", + "cryptoConfigFileName": "crypto-config-org2", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org2.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7080, - \\"fullAddress\\": \\"ca.org2.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG2_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG2_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", + "ca": { + "prefix": "ca", + "address": "ca.org2.example.com", + "port": 7054, + "exposePort": 7080, + "fullAddress": "ca.org2.example.com:7054", + "caAdminNameVar": "ORG2_CA_ADMIN_NAME", + "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org2.example.com\\" + "cli": { + "address": "cli.org2.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": {} + "ordererGroups": [], + "tools": {} } ], - \\"ordererGroup\\": { - \\"name\\": \\"group1\\", - \\"consensus\\": \\"etcdraft\\", - \\"configtxOrdererDefaults\\": \\"Group1Defaults\\", - \\"profileName\\": \\"Group1Genesis\\", - \\"genesisBlockName\\": \\"Group1Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer1\\" + "ordererGroup": { + "name": "group1", + "consensus": "etcdraft", + "configtxOrdererDefaults": "Group1Defaults", + "profileName": "Group1Genesis", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer1" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, { - \\"name\\": \\"orderer1.group1\\", - \\"address\\": \\"orderer1.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7031, - \\"fullAddress\\": \\"orderer1.group1.orderer1.com:7031\\" + "name": "orderer1.group1", + "address": "orderer1.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7031, + "fullAddress": "orderer1.group1.orderer1.com:7031" }, { - \\"name\\": \\"orderer2.group1\\", - \\"address\\": \\"orderer2.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7032, - \\"fullAddress\\": \\"orderer2.group1.orderer1.com:7032\\" + "name": "orderer2.group1", + "address": "orderer2.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7032, + "fullAddress": "orderer2.group1.orderer1.com:7032" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } ], - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } }, - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, - \\"instantiatingOrg\\": { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "instantiatingOrg": { + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } } }, - \\"initRequired\\": false, - \\"endorsement\\": \\"OR ('Org1MSP.member', 'Org2MSP.member')\\", - \\"instantiatingOrg\\": { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "initRequired": false, + "endorsement": "OR ('Org1MSP.member', 'Org2MSP.member')", + "instantiatingOrg": { + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } }, - \\"privateData\\": [] + "privateData": [] }, { - \\"directory\\": \\"./chaincodes/chaincode-java-simple\\", - \\"name\\": \\"chaincode2\\", - \\"version\\": \\"0.0.1\\", - \\"lang\\": \\"java\\", - \\"channel\\": { - \\"name\\": \\"my-channel2\\", - \\"profileName\\": \\"MyChannel2\\", - \\"orgs\\": [ + "directory": "./chaincodes/chaincode-java-simple", + "name": "chaincode2", + "version": "0.0.1", + "lang": "java", + "channel": { + "name": "my-channel2", + "profileName": "MyChannel2", + "orgs": [ { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } }, { - \\"name\\": \\"Org2\\", - \\"mspName\\": \\"Org2MSP\\", - \\"domain\\": \\"org2.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org2\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org2", + "mspName": "Org2MSP", + "domain": "org2.example.com", + "cryptoConfigFileName": "crypto-config-org2", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7081, - \\"fullAddress\\": \\"peer0.org2.example.com:7081\\", - \\"couchDbExposePort\\": 5140, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7081, + "fullAddress": "peer0.org2.example.com:7081", + "couchDbExposePort": 5140, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org2.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7080, - \\"fullAddress\\": \\"ca.org2.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG2_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG2_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org2.example.com:7081 peer1.org2.example.com:7082\\"", + "ca": { + "prefix": "ca", + "address": "ca.org2.example.com", + "port": 7054, + "exposePort": 7080, + "fullAddress": "ca.org2.example.com:7054", + "caAdminNameVar": "ORG2_CA_ADMIN_NAME", + "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org2.example.com\\" + "cli": { + "address": "cli.org2.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org2.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer1", + "address": "peer1.org2.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7082, - \\"fullAddress\\": \\"peer1.org2.example.com:7082\\", - \\"couchDbExposePort\\": 5141, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7082, + "fullAddress": "peer1.org2.example.com:7082", + "couchDbExposePort": 5141, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": {} + "ordererGroups": [], + "tools": {} } ], - \\"ordererGroup\\": { - \\"name\\": \\"group1\\", - \\"consensus\\": \\"etcdraft\\", - \\"configtxOrdererDefaults\\": \\"Group1Defaults\\", - \\"profileName\\": \\"Group1Genesis\\", - \\"genesisBlockName\\": \\"Group1Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer1\\" + "ordererGroup": { + "name": "group1", + "consensus": "etcdraft", + "configtxOrdererDefaults": "Group1Defaults", + "profileName": "Group1Genesis", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer1" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, { - \\"name\\": \\"orderer1.group1\\", - \\"address\\": \\"orderer1.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7031, - \\"fullAddress\\": \\"orderer1.group1.orderer1.com:7031\\" + "name": "orderer1.group1", + "address": "orderer1.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7031, + "fullAddress": "orderer1.group1.orderer1.com:7031" }, { - \\"name\\": \\"orderer2.group1\\", - \\"address\\": \\"orderer2.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7032, - \\"fullAddress\\": \\"orderer2.group1.orderer1.com:7032\\" + "name": "orderer2.group1", + "address": "orderer2.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7032, + "fullAddress": "orderer2.group1.orderer1.com:7032" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } ], - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" } }, - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer1.com\\", - \\"orgName\\": \\"Orderer1\\", - \\"orgMspName\\": \\"Orderer1MSP\\", - \\"domain\\": \\"orderer1.com\\", - \\"consensus\\": \\"etcdraft\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer1.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer1.com", + "orgName": "Orderer1", + "orgMspName": "Orderer1MSP", + "domain": "orderer1.com", + "consensus": "etcdraft", + "port": 7030, + "fullAddress": "orderer0.group1.orderer1.com:7030" }, - \\"instantiatingOrg\\": { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "instantiatingOrg": { + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } } }, - \\"initRequired\\": false, - \\"endorsement\\": \\"OR ('Org1MSP.member', 'Org2MSP.member')\\", - \\"instantiatingOrg\\": { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "initRequired": false, + "endorsement": "OR ('Org1MSP.member', 'Org2MSP.member')", + "instantiatingOrg": { + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7061, - \\"fullAddress\\": \\"peer0.org1.example.com:7061\\", - \\"couchDbExposePort\\": 5120, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7061, + "fullAddress": "peer0.org1.example.com:7061", + "couchDbExposePort": 5120, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7060, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7061 peer1.org1.example.com:7062\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7060, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7062, - \\"fullAddress\\": \\"peer1.org1.example.com:7062\\", - \\"couchDbExposePort\\": 5121, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7062, + "fullAddress": "peer1.org1.example.com:7062", + "couchDbExposePort": 5121, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": { - \\"fabloRest\\": { - \\"address\\": \\"fablo-rest.org1.example.com\\", - \\"mspId\\": \\"Org1MSP\\", - \\"port\\": 8802, - \\"fabricCaUrl\\": \\"https://ca.org1.example.com:7054\\", - \\"fabricCaName\\": \\"ca.org1.example.com\\", - \\"discoveryUrls\\": \\"grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082\\", - \\"discoverySslTargetNameOverrides\\": \\"\\", - \\"discoveryTlsCaCertFiles\\": \\"/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\", - \\"logging\\": { - \\"error\\": \\"console\\", - \\"warn\\": \\"console\\", - \\"info\\": \\"console\\", - \\"debug\\": \\"console\\" + "ordererGroups": [], + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "mspId": "Org1MSP", + "port": 8802, + "fabricCaUrl": "https://ca.org1.example.com:7054", + "fabricCaName": "ca.org1.example.com", + "discoveryUrls": "grpcs://peer0.org1.example.com:7061,grpcs://peer1.org1.example.com:7062,grpcs://peer0.org2.example.com:7081,grpcs://peer1.org2.example.com:7082", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt,/crypto/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt,/crypto/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt", + "logging": { + "error": "console", + "warn": "console", + "info": "console", + "debug": "console" } } } }, - \\"privateData\\": [] + "privateData": [] } ], - \\"hooks\\": { - \\"postGenerate\\": \\"perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' \\\\\\"./fablo-target/fabric-config/configtx.yaml\\\\\\"\\" + "hooks": { + "postGenerate": "perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' \\"./fablo-target/fabric-config/configtx.yaml\\"" } } @@ -2426,478 +2426,478 @@ exports[`extend config should extend default config 1`] = ` Validation warnings count: 0 =========================================================== { - \\"global\\": { - \\"fabricVersion\\": \\"2.4.7\\", - \\"tls\\": false, - \\"engine\\": \\"docker\\", - \\"peerDevMode\\": false, - \\"fabricCaVersion\\": \\"1.5.5\\", - \\"fabricCcenvVersion\\": \\"2.4.7\\", - \\"fabricBaseosVersion\\": \\"2.4.7\\", - \\"fabricJavaenvVersion\\": \\"2.4\\", - \\"fabricNodeenvVersion\\": \\"2.4\\", - \\"fabricRecommendedNodeVersion\\": \\"16\\", - \\"paths\\": { - \\"fabloConfig\\": \\"\\", - \\"chaincodesBaseDir\\": \\"\\" + "global": { + "fabricVersion": "2.4.7", + "tls": false, + "engine": "docker", + "peerDevMode": false, + "fabricCaVersion": "1.5.5", + "fabricCcenvVersion": "2.4.7", + "fabricBaseosVersion": "2.4.7", + "fabricJavaenvVersion": "2.4", + "fabricNodeenvVersion": "2.4", + "fabricRecommendedNodeVersion": "16", + "paths": { + "fabloConfig": "", + "chaincodesBaseDir": "" }, - \\"monitoring\\": { - \\"loglevel\\": \\"info\\" + "monitoring": { + "loglevel": "info" }, - \\"capabilities\\": { - \\"channel\\": \\"V2_0\\", - \\"orderer\\": \\"V2_0\\", - \\"application\\": \\"V2_0\\", - \\"isV2\\": true + "capabilities": { + "channel": "V2_0", + "orderer": "V2_0", + "application": "V2_0", + "isV2": true }, - \\"tools\\": {} + "tools": {} }, - \\"ordererGroups\\": [ + "ordererGroups": [ { - \\"name\\": \\"group1\\", - \\"consensus\\": \\"solo\\", - \\"configtxOrdererDefaults\\": \\"Group1Defaults\\", - \\"profileName\\": \\"Group1Genesis\\", - \\"genesisBlockName\\": \\"Group1Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer\\" + "name": "group1", + "consensus": "solo", + "configtxOrdererDefaults": "Group1Defaults", + "profileName": "Group1Genesis", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer.example.com\\", - \\"orgName\\": \\"Orderer\\", - \\"orgMspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer.example.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer.example.com", + "orgName": "Orderer", + "orgMspName": "OrdererMSP", + "domain": "orderer.example.com", + "consensus": "solo", + "port": 7030, + "fullAddress": "orderer0.group1.orderer.example.com:7030" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer.example.com\\", - \\"orgName\\": \\"Orderer\\", - \\"orgMspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer.example.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer.example.com", + "orgName": "Orderer", + "orgMspName": "OrdererMSP", + "domain": "orderer.example.com", + "consensus": "solo", + "port": 7030, + "fullAddress": "orderer0.group1.orderer.example.com:7030" } ], - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer.example.com\\", - \\"orgName\\": \\"Orderer\\", - \\"orgMspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer.example.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer.example.com", + "orgName": "Orderer", + "orgMspName": "OrdererMSP", + "domain": "orderer.example.com", + "consensus": "solo", + "port": 7030, + "fullAddress": "orderer0.group1.orderer.example.com:7030" } } ], - \\"orderedHeadsDistinct\\": [ + "orderedHeadsDistinct": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer.example.com\\", - \\"orgName\\": \\"Orderer\\", - \\"orgMspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer.example.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer.example.com", + "orgName": "Orderer", + "orgMspName": "OrdererMSP", + "domain": "orderer.example.com", + "consensus": "solo", + "port": 7030, + "fullAddress": "orderer0.group1.orderer.example.com:7030" } ], - \\"orgs\\": [ + "orgs": [ { - \\"name\\": \\"Orderer\\", - \\"mspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-orderer\\", - \\"peersCount\\": 0, - \\"peers\\": [], - \\"anchorPeers\\": [], - \\"bootstrapPeers\\": \\"\\\\\\"\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.orderer.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7020, - \\"fullAddress\\": \\"ca.orderer.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORDERER_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORDERER_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "name": "Orderer", + "mspName": "OrdererMSP", + "domain": "orderer.example.com", + "cryptoConfigFileName": "crypto-config-orderer", + "peersCount": 0, + "peers": [], + "anchorPeers": [], + "bootstrapPeers": "\\"\\"", + "ca": { + "prefix": "ca", + "address": "ca.orderer.example.com", + "port": 7054, + "exposePort": 7020, + "fullAddress": "ca.orderer.example.com:7054", + "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", + "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.orderer.example.com\\" + "cli": { + "address": "cli.orderer.example.com" }, - \\"ordererGroups\\": [ + "ordererGroups": [ { - \\"name\\": \\"group1\\", - \\"consensus\\": \\"solo\\", - \\"configtxOrdererDefaults\\": \\"Group1Defaults\\", - \\"profileName\\": \\"Group1Genesis\\", - \\"genesisBlockName\\": \\"Group1Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer\\" + "name": "group1", + "consensus": "solo", + "configtxOrdererDefaults": "Group1Defaults", + "profileName": "Group1Genesis", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer.example.com\\", - \\"orgName\\": \\"Orderer\\", - \\"orgMspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer.example.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer.example.com", + "orgName": "Orderer", + "orgMspName": "OrdererMSP", + "domain": "orderer.example.com", + "consensus": "solo", + "port": 7030, + "fullAddress": "orderer0.group1.orderer.example.com:7030" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer.example.com\\", - \\"orgName\\": \\"Orderer\\", - \\"orgMspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer.example.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer.example.com", + "orgName": "Orderer", + "orgMspName": "OrdererMSP", + "domain": "orderer.example.com", + "consensus": "solo", + "port": 7030, + "fullAddress": "orderer0.group1.orderer.example.com:7030" } ] } ], - \\"tools\\": {} + "tools": {} }, { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7041, - \\"fullAddress\\": \\"peer0.org1.example.com:7041\\", - \\"couchDbExposePort\\": 5100, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7041, + "fullAddress": "peer0.org1.example.com:7041", + "couchDbExposePort": 5100, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7042, - \\"fullAddress\\": \\"peer1.org1.example.com:7042\\", - \\"couchDbExposePort\\": 5101, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7042, + "fullAddress": "peer1.org1.example.com:7042", + "couchDbExposePort": 5101, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7041, - \\"fullAddress\\": \\"peer0.org1.example.com:7041\\", - \\"couchDbExposePort\\": 5100, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7041, + "fullAddress": "peer0.org1.example.com:7041", + "couchDbExposePort": 5100, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7042, - \\"fullAddress\\": \\"peer1.org1.example.com:7042\\", - \\"couchDbExposePort\\": 5101, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7042, + "fullAddress": "peer1.org1.example.com:7042", + "couchDbExposePort": 5101, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7040, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7041, - \\"fullAddress\\": \\"peer0.org1.example.com:7041\\", - \\"couchDbExposePort\\": 5100, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7041, + "fullAddress": "peer0.org1.example.com:7041", + "couchDbExposePort": 5100, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": {} + "ordererGroups": [], + "tools": {} } ], - \\"channels\\": [ + "channels": [ { - \\"name\\": \\"my-channel1\\", - \\"profileName\\": \\"MyChannel1\\", - \\"orgs\\": [ + "name": "my-channel1", + "profileName": "MyChannel1", + "orgs": [ { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7041, - \\"fullAddress\\": \\"peer0.org1.example.com:7041\\", - \\"couchDbExposePort\\": 5100, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7041, + "fullAddress": "peer0.org1.example.com:7041", + "couchDbExposePort": 5100, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7042, - \\"fullAddress\\": \\"peer1.org1.example.com:7042\\", - \\"couchDbExposePort\\": 5101, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7042, + "fullAddress": "peer1.org1.example.com:7042", + "couchDbExposePort": 5101, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7041, - \\"fullAddress\\": \\"peer0.org1.example.com:7041\\", - \\"couchDbExposePort\\": 5100, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7041, + "fullAddress": "peer0.org1.example.com:7041", + "couchDbExposePort": 5100, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7042, - \\"fullAddress\\": \\"peer1.org1.example.com:7042\\", - \\"couchDbExposePort\\": 5101, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7042, + "fullAddress": "peer1.org1.example.com:7042", + "couchDbExposePort": 5101, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7040, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7041, - \\"fullAddress\\": \\"peer0.org1.example.com:7041\\", - \\"couchDbExposePort\\": 5100, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7041, + "fullAddress": "peer0.org1.example.com:7041", + "couchDbExposePort": 5100, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": {} + "ordererGroups": [], + "tools": {} } ], - \\"ordererGroup\\": { - \\"name\\": \\"group1\\", - \\"consensus\\": \\"solo\\", - \\"configtxOrdererDefaults\\": \\"Group1Defaults\\", - \\"profileName\\": \\"Group1Genesis\\", - \\"genesisBlockName\\": \\"Group1Genesis.block\\", - \\"hostingOrgs\\": [ - \\"Orderer\\" + "ordererGroup": { + "name": "group1", + "consensus": "solo", + "configtxOrdererDefaults": "Group1Defaults", + "profileName": "Group1Genesis", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer" ], - \\"orderers\\": [ + "orderers": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer.example.com\\", - \\"orgName\\": \\"Orderer\\", - \\"orgMspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer.example.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer.example.com", + "orgName": "Orderer", + "orgMspName": "OrdererMSP", + "domain": "orderer.example.com", + "consensus": "solo", + "port": 7030, + "fullAddress": "orderer0.group1.orderer.example.com:7030" } ], - \\"ordererHeads\\": [ + "ordererHeads": [ { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer.example.com\\", - \\"orgName\\": \\"Orderer\\", - \\"orgMspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer.example.com:7030\\" + "name": "orderer0.group1", + "address": "orderer0.group1.orderer.example.com", + "orgName": "Orderer", + "orgMspName": "OrdererMSP", + "domain": "orderer.example.com", + "consensus": "solo", + "port": 7030, + "fullAddress": "orderer0.group1.orderer.example.com:7030" } ], - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer.example.com\\", - \\"orgName\\": \\"Orderer\\", - \\"orgMspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer.example.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer.example.com", + "orgName": "Orderer", + "orgMspName": "OrdererMSP", + "domain": "orderer.example.com", + "consensus": "solo", + "port": 7030, + "fullAddress": "orderer0.group1.orderer.example.com:7030" } }, - \\"ordererHead\\": { - \\"name\\": \\"orderer0.group1\\", - \\"address\\": \\"orderer0.group1.orderer.example.com\\", - \\"orgName\\": \\"Orderer\\", - \\"orgMspName\\": \\"OrdererMSP\\", - \\"domain\\": \\"orderer.example.com\\", - \\"consensus\\": \\"solo\\", - \\"port\\": 7030, - \\"fullAddress\\": \\"orderer0.group1.orderer.example.com:7030\\" + "ordererHead": { + "name": "orderer0.group1", + "address": "orderer0.group1.orderer.example.com", + "orgName": "Orderer", + "orgMspName": "OrdererMSP", + "domain": "orderer.example.com", + "consensus": "solo", + "port": 7030, + "fullAddress": "orderer0.group1.orderer.example.com:7030" }, - \\"instantiatingOrg\\": { - \\"name\\": \\"Org1\\", - \\"mspName\\": \\"Org1MSP\\", - \\"domain\\": \\"org1.example.com\\", - \\"cryptoConfigFileName\\": \\"crypto-config-org1\\", - \\"peersCount\\": 2, - \\"peers\\": [ + "instantiatingOrg": { + "name": "Org1", + "mspName": "Org1MSP", + "domain": "org1.example.com", + "cryptoConfigFileName": "crypto-config-org1", + "peersCount": 2, + "peers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7041, - \\"fullAddress\\": \\"peer0.org1.example.com:7041\\", - \\"couchDbExposePort\\": 5100, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7041, + "fullAddress": "peer0.org1.example.com:7041", + "couchDbExposePort": 5100, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7042, - \\"fullAddress\\": \\"peer1.org1.example.com:7042\\", - \\"couchDbExposePort\\": 5101, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7042, + "fullAddress": "peer1.org1.example.com:7042", + "couchDbExposePort": 5101, + "gatewayEnabled": true } ], - \\"anchorPeers\\": [ + "anchorPeers": [ { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7041, - \\"fullAddress\\": \\"peer0.org1.example.com:7041\\", - \\"couchDbExposePort\\": 5100, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7041, + "fullAddress": "peer0.org1.example.com:7041", + "couchDbExposePort": 5100, + "gatewayEnabled": true }, { - \\"name\\": \\"peer1\\", - \\"address\\": \\"peer1.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "name": "peer1", + "address": "peer1.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7042, - \\"fullAddress\\": \\"peer1.org1.example.com:7042\\", - \\"couchDbExposePort\\": 5101, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7042, + "fullAddress": "peer1.org1.example.com:7042", + "couchDbExposePort": 5101, + "gatewayEnabled": true } ], - \\"bootstrapPeers\\": \\"\\\\\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\\\\\"\\", - \\"ca\\": { - \\"prefix\\": \\"ca\\", - \\"address\\": \\"ca.org1.example.com\\", - \\"port\\": 7054, - \\"exposePort\\": 7040, - \\"fullAddress\\": \\"ca.org1.example.com:7054\\", - \\"caAdminNameVar\\": \\"ORG1_CA_ADMIN_NAME\\", - \\"caAdminPassVar\\": \\"ORG1_CA_ADMIN_PASSWORD\\", - \\"db\\": \\"sqlite\\" + "bootstrapPeers": "\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\"", + "ca": { + "prefix": "ca", + "address": "ca.org1.example.com", + "port": 7054, + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite" }, - \\"cli\\": { - \\"address\\": \\"cli.org1.example.com\\" + "cli": { + "address": "cli.org1.example.com" }, - \\"headPeer\\": { - \\"name\\": \\"peer0\\", - \\"address\\": \\"peer0.org1.example.com\\", - \\"db\\": { - \\"type\\": \\"LevelDb\\" + "headPeer": { + "name": "peer0", + "address": "peer0.org1.example.com", + "db": { + "type": "LevelDb" }, - \\"isAnchorPeer\\": true, - \\"port\\": 7041, - \\"fullAddress\\": \\"peer0.org1.example.com:7041\\", - \\"couchDbExposePort\\": 5100, - \\"gatewayEnabled\\": true + "isAnchorPeer": true, + "port": 7041, + "fullAddress": "peer0.org1.example.com:7041", + "couchDbExposePort": 5100, + "gatewayEnabled": true }, - \\"ordererGroups\\": [], - \\"tools\\": {} + "ordererGroups": [], + "tools": {} } } ], - \\"chaincodes\\": [], - \\"hooks\\": { - \\"postGenerate\\": \\"\\" + "chaincodes": [], + "hooks": { + "postGenerate": "" } } @@ -2907,115 +2907,115 @@ Validation warnings count: 0 exports[`init should init simple fablo config 1`] = ` "{ - \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json\\", - \\"global\\": { - \\"fabricVersion\\": \\"2.4.7\\", - \\"tls\\": false, - \\"engine\\": \\"docker\\", - \\"peerDevMode\\": false + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", + "global": { + "fabricVersion": "2.4.7", + "tls": false, + "engine": "docker", + "peerDevMode": false }, - \\"orgs\\": [ + "orgs": [ { - \\"organization\\": { - \\"name\\": \\"Orderer\\", - \\"domain\\": \\"orderer.example.com\\" + "organization": { + "name": "Orderer", + "domain": "orderer.example.com" }, - \\"orderers\\": [ + "orderers": [ { - \\"groupName\\": \\"group1\\", - \\"type\\": \\"solo\\", - \\"instances\\": 1 + "groupName": "group1", + "type": "solo", + "instances": 1 } ], - \\"tools\\": {} + "tools": {} }, { - \\"organization\\": { - \\"name\\": \\"Org1\\", - \\"domain\\": \\"org1.example.com\\" + "organization": { + "name": "Org1", + "domain": "org1.example.com" }, - \\"peer\\": { - \\"instances\\": 2, - \\"db\\": \\"LevelDb\\" + "peer": { + "instances": 2, + "db": "LevelDb" }, - \\"tools\\": {} + "tools": {} } ], - \\"channels\\": [ + "channels": [ { - \\"name\\": \\"my-channel1\\", - \\"orgs\\": [ + "name": "my-channel1", + "orgs": [ { - \\"name\\": \\"Org1\\", - \\"peers\\": [ - \\"peer0\\", - \\"peer1\\" + "name": "Org1", + "peers": [ + "peer0", + "peer1" ] } ] } ], - \\"chaincodes\\": [] + "chaincodes": [] }" `; exports[`init should init simple fablo config with node chaincode 1`] = ` "{ - \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json\\", - \\"global\\": { - \\"fabricVersion\\": \\"2.4.7\\", - \\"tls\\": false, - \\"engine\\": \\"docker\\", - \\"peerDevMode\\": false + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", + "global": { + "fabricVersion": "2.4.7", + "tls": false, + "engine": "docker", + "peerDevMode": false }, - \\"orgs\\": [ + "orgs": [ { - \\"organization\\": { - \\"name\\": \\"Orderer\\", - \\"domain\\": \\"orderer.example.com\\" + "organization": { + "name": "Orderer", + "domain": "orderer.example.com" }, - \\"orderers\\": [ + "orderers": [ { - \\"groupName\\": \\"group1\\", - \\"type\\": \\"solo\\", - \\"instances\\": 1 + "groupName": "group1", + "type": "solo", + "instances": 1 } ], - \\"tools\\": {} + "tools": {} }, { - \\"organization\\": { - \\"name\\": \\"Org1\\", - \\"domain\\": \\"org1.example.com\\" + "organization": { + "name": "Org1", + "domain": "org1.example.com" }, - \\"peer\\": { - \\"instances\\": 2, - \\"db\\": \\"LevelDb\\" + "peer": { + "instances": 2, + "db": "LevelDb" }, - \\"tools\\": {} + "tools": {} } ], - \\"channels\\": [ + "channels": [ { - \\"name\\": \\"my-channel1\\", - \\"orgs\\": [ + "name": "my-channel1", + "orgs": [ { - \\"name\\": \\"Org1\\", - \\"peers\\": [ - \\"peer0\\", - \\"peer1\\" + "name": "Org1", + "peers": [ + "peer0", + "peer1" ] } ] } ], - \\"chaincodes\\": [ + "chaincodes": [ { - \\"name\\": \\"chaincode1\\", - \\"version\\": \\"0.0.1\\", - \\"lang\\": \\"node\\", - \\"channel\\": \\"my-channel1\\", - \\"directory\\": \\"./chaincodes/chaincode-kv-node\\" + "name": "chaincode1", + "version": "0.0.1", + "lang": "node", + "channel": "my-channel1", + "directory": "./chaincodes/chaincode-kv-node" } ] }" @@ -3023,65 +3023,65 @@ exports[`init should init simple fablo config with node chaincode 1`] = ` exports[`init should init simple fablo config with node chaincode and rest api 1`] = ` "{ - \\"$schema\\": \\"https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json\\", - \\"global\\": { - \\"fabricVersion\\": \\"2.4.7\\", - \\"tls\\": false, - \\"engine\\": \\"docker\\", - \\"peerDevMode\\": false + "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", + "global": { + "fabricVersion": "2.4.7", + "tls": false, + "engine": "docker", + "peerDevMode": false }, - \\"orgs\\": [ + "orgs": [ { - \\"organization\\": { - \\"name\\": \\"Orderer\\", - \\"domain\\": \\"orderer.example.com\\" + "organization": { + "name": "Orderer", + "domain": "orderer.example.com" }, - \\"orderers\\": [ + "orderers": [ { - \\"groupName\\": \\"group1\\", - \\"type\\": \\"solo\\", - \\"instances\\": 1 + "groupName": "group1", + "type": "solo", + "instances": 1 } ], - \\"tools\\": { - \\"fabloRest\\": true + "tools": { + "fabloRest": true } }, { - \\"organization\\": { - \\"name\\": \\"Org1\\", - \\"domain\\": \\"org1.example.com\\" + "organization": { + "name": "Org1", + "domain": "org1.example.com" }, - \\"peer\\": { - \\"instances\\": 2, - \\"db\\": \\"LevelDb\\" + "peer": { + "instances": 2, + "db": "LevelDb" }, - \\"tools\\": { - \\"fabloRest\\": true + "tools": { + "fabloRest": true } } ], - \\"channels\\": [ + "channels": [ { - \\"name\\": \\"my-channel1\\", - \\"orgs\\": [ + "name": "my-channel1", + "orgs": [ { - \\"name\\": \\"Org1\\", - \\"peers\\": [ - \\"peer0\\", - \\"peer1\\" + "name": "Org1", + "peers": [ + "peer0", + "peer1" ] } ] } ], - \\"chaincodes\\": [ + "chaincodes": [ { - \\"name\\": \\"chaincode1\\", - \\"version\\": \\"0.0.1\\", - \\"lang\\": \\"node\\", - \\"channel\\": \\"my-channel1\\", - \\"directory\\": \\"./chaincodes/chaincode-kv-node\\" + "name": "chaincode1", + "version": "0.0.1", + "lang": "node", + "channel": "my-channel1", + "directory": "./chaincodes/chaincode-kv-node" } ] }" diff --git a/e2e/__snapshots__/schema.test.ts.snap b/e2e/__snapshots__/schema.test.ts.snap index 8b96b88d..a2096822 100644 --- a/e2e/__snapshots__/schema.test.ts.snap +++ b/e2e/__snapshots__/schema.test.ts.snap @@ -1,18 +1,18 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`schema should match snapshot 1`] = ` -Object { +{ "$id": "http://example.com/example.json", "$schema": "http://json-schema.org/draft-07/schema", - "default": Object {}, - "properties": Object { - "$schema": Object { + "default": {}, + "properties": { + "$schema": { "const": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", }, - "chaincodes": Object { + "chaincodes": { "$id": "#/properties/chaincodes", - "default": Array [ - Object { + "default": [ + { "channel": "my-channel1", "directory": "chaincode1", "endorsement": "AND ('Org1.member')", @@ -22,14 +22,14 @@ Object { "version": "0.0.1", }, ], - "items": Object { + "items": { "$id": "#/properties/chaincodes/items", - "properties": Object { - "channel": Object { + "properties": { + "channel": { "$id": "#/properties/chaincodes/items/properties/channel", - "enumSource": Array [ - Array [], - Object { + "enumSource": [ + [], + { "source": "channels", "value": "{{item.name}}", }, @@ -37,33 +37,33 @@ Object { "pattern": "^[a-z0-9_-]+$", "title": "Channel name", "type": "string", - "watch": Object { + "watch": { "channels": "channels", }, }, - "directory": Object { + "directory": { "$id": "#/properties/chaincodes/items/properties/directory", "title": "Chaincode directory", "type": "string", }, - "endorsement": Object { + "endorsement": { "$id": "#/properties/chaincodes/items/properties/endorsement", "title": "Endorsement configuration", "type": "string", }, - "init": Object { + "init": { "$id": "#/properties/chaincodes/items/properties/init", "title": "Initialization arguments (for Hyperledger Fabric below 2.0)", "type": "string", }, - "initRequired": Object { + "initRequired": { "$id": "#/properties/chaincodes/items/properties/initRequired", "title": "Whether the chaincode requires initialization transaction (for Hyperledger Fabric 2.0 and greater)", "type": "boolean", }, - "lang": Object { + "lang": { "$id": "#/properties/chaincodes/items/properties/lang", - "enum": Array [ + "enum": [ "golang", "java", "node", @@ -71,30 +71,30 @@ Object { "title": "Language", "type": "string", }, - "name": Object { + "name": { "$id": "#/properties/chaincodes/items/properties/name", "pattern": "^[a-zA-Z0-9_-]+$", "title": "Name", "type": "string", }, - "privateData": Object { + "privateData": { "$id": "#/properties/chaincodes/items/properties/privateData", - "items": Object { + "items": { "$id": "#/properties/chaincodes/items/properties/privateData/items", - "properties": Object { - "name": Object { + "properties": { + "name": { "$id": "#/properties/chaincodes/items/properties/privateData/items/properties/name", "pattern": "^[A-Za-z0-9_-]+$", "title": "Collection name", "type": "string", }, - "orgNames": Object { + "orgNames": { "$id": "#/properties/chaincodes/items/properties/privateData/items/properties/orgNames", - "items": Object { + "items": { "$id": "#/properties/chaincodes/items/properties/privateData/items/properties/orgNames/items", - "enumSource": Array [ - Array [], - Object { + "enumSource": [ + [], + { "source": "orgs", "value": "{{item.organization.name}}", }, @@ -102,7 +102,7 @@ Object { "pattern": "^[A-Za-z0-9]+$", "title": "Organization name", "type": "string", - "watch": Object { + "watch": { "orgs": "orgs", }, }, @@ -110,7 +110,7 @@ Object { "type": "array", }, }, - "required": Array [ + "required": [ "name", "orgNames", ], @@ -120,14 +120,14 @@ Object { "title": "Private data collections", "type": "array", }, - "version": Object { + "version": { "$id": "#/properties/chaincodes/items/properties/version", - "pattern": "^[a-zA-Z0-9\\\\.]+$", + "pattern": "^[a-zA-Z0-9\\.]+$", "title": "Version", "type": "string", }, }, - "required": Array [ + "required": [ "name", "version", "lang", @@ -140,57 +140,57 @@ Object { "title": "Chaincodes", "type": "array", }, - "channels": Object { + "channels": { "$id": "#/properties/channels", - "default": Array [ - Object { + "default": [ + { "name": "my-channel1", - "orgs": Array [ - Object { + "orgs": [ + { "name": "Org1", - "peers": Array [ + "peers": [ "peer0", ], }, ], }, - Object { + { "name": "my-channel2", - "orgs": Array [ - Object { + "orgs": [ + { "name": "Org1", - "peers": Array [ + "peers": [ "peer1", ], }, ], }, ], - "items": Object { + "items": { "$id": "#/properties/channels/items", - "properties": Object { - "name": Object { + "properties": { + "name": { "$id": "#/properties/channels/items/properties/name", "pattern": "^[a-z0-9_-]+$", "title": "Name", "type": "string", }, - "ordererGroup": Object { + "ordererGroup": { "$id": "#/properties/channels/items/properties/ordererGroup", "pattern": "^[a-zA-Z0-9]+$", "title": "Name of Orderer Org handling the channel", "type": "string", }, - "orgs": Object { + "orgs": { "$id": "#/properties/channels/items/properties/orgs", - "items": Object { + "items": { "$id": "#/properties/channels/items/properties/orgs/items", - "properties": Object { - "name": Object { + "properties": { + "name": { "$id": "#/properties/channels/items/properties/orgs/items/properties/name", - "enumSource": Array [ - Array [], - Object { + "enumSource": [ + [], + { "source": "orgs", "value": "{{item.organization.name}}", }, @@ -198,13 +198,13 @@ Object { "pattern": "^[a-zA-Z0-9]+$", "title": "Organization name", "type": "string", - "watch": Object { + "watch": { "orgs": "orgs", }, }, - "peers": Object { + "peers": { "$id": "#/properties/channels/items/properties/orgs/items/properties/peers", - "items": Object { + "items": { "$id": "#/properties/channels/items/properties/orgs/items/properties/peers/items", "pattern": "^[a-z0-9]+$", "title": "Peer", @@ -214,7 +214,7 @@ Object { "type": "array", }, }, - "required": Array [ + "required": [ "name", "peers", ], @@ -225,7 +225,7 @@ Object { "type": "array", }, }, - "required": Array [ + "required": [ "name", "orgs", ], @@ -235,34 +235,34 @@ Object { "title": "Channels", "type": "array", }, - "global": Object { + "global": { "$id": "#/properties/global", "description": "Basic settings of the Hyperledger Fabric network", - "properties": Object { - "engine": Object { + "properties": { + "engine": { "$id": "#/properties/global/properties/engine", "default": "docker", - "enum": Array [ + "enum": [ "docker", "kubernetes", ], "title": "Engine on which the network will be deployed", "type": "string", }, - "fabricVersion": Object { + "fabricVersion": { "$id": "#/properties/global/properties/fabricVersion", "default": "2.4.2", "title": "Hyperledger Fabric version", "type": "string", }, - "monitoring": Object { + "monitoring": { "$id": "#/properties/monitoring", "description": "Optional settings for monitoring purposes", - "properties": Object { - "loglevel": Object { + "properties": { + "loglevel": { "$id": "#/properties/monitoring/properties/loglevel", "default": "info", - "enum": Array [ + "enum": [ "debug", "info", "warn", @@ -271,48 +271,48 @@ Object { "type": "string", }, }, - "required": Array [], + "required": [], "title": "Monitoring settings", "type": "object", }, - "peerDevMode": Object { + "peerDevMode": { "$id": "#/properties/global/properties/peerDevMode", "default": false, "title": "Start all peers in dev mode", "type": "boolean", }, - "tls": Object { + "tls": { "$id": "#/properties/global/properties/tls", "default": true, "title": "Use TLS", "type": "boolean", }, - "tools": Object { + "tools": { "$id": "#/properties/global/properties/tools", - "properties": Object { - "explorer": Object { + "properties": { + "explorer": { "$id": "#/properties/global/properties/tools/properties/explorer", "title": "Blockchain Explorer enabled", "type": "boolean", }, }, - "required": Array [], + "required": [], "title": "Tools", "type": "object", }, }, - "required": Array [ + "required": [ "fabricVersion", "tls", ], "title": "Global network settings", "type": "object", }, - "hooks": Object { + "hooks": { "$id": "#/properties/hooks", "description": "Operations (bash scripts or commands) that should be executed after specific events. The PWD for the Hooks is set to 'fablo-target' directory", - "properties": Object { - "postGenerate": Object { + "properties": { + "postGenerate": { "$id": "#/properties/hooks/postGenerate", "description": "Operation to run run after a network config is generated", "title": "Post generate hook", @@ -322,102 +322,102 @@ Object { "title": "Hooks", "type": "object", }, - "orgs": Object { + "orgs": { "$id": "#/properties/orgs", - "default": Array [ - Object { - "ca": Object { + "default": [ + { + "ca": { "prefix": "ca", }, - "orderer": Object { + "orderer": { "instances": 1, "prefix": "orderer", "type": "solo", }, - "organization": Object { + "organization": { "domain": "orderer.example.com", "mspName": "OrdererMSP", "name": "Orderer", }, }, - Object { - "ca": Object { + { + "ca": { "prefix": "ca", }, - "organization": Object { + "organization": { "domain": "org1.example.com", "mspName": "Org1MSP", "name": "Org1", }, - "peer": Object { + "peer": { "db": "LevelDb", "instances": 2, "prefix": "peer", }, }, ], - "items": Object { + "items": { "$id": "#/properties/orgs/items", - "properties": Object { - "ca": Object { + "properties": { + "ca": { "$id": "#/properties/orgs/items/properties/ca", - "properties": Object { - "db": Object { + "properties": { + "db": { "$id": "#/properties/orgs/items/properties/ca/properties/db", - "enum": Array [ + "enum": [ "sqlite", "postgres", ], "title": "Database", "type": "string", }, - "prefix": Object { + "prefix": { "$id": "#/properties/orgs/items/properties/ca/properties/prefix", - "pattern": "^[a-z0-9\\\\.\\\\-]+$", + "pattern": "^[a-z0-9\\.\\-]+$", "title": "Domain prefix", "type": "string", }, }, - "required": Array [], + "required": [], "title": "Organization Certificate Authority (CA)", "type": "object", }, - "orderers": Object { + "orderers": { "$id": "#/properties/orgs/items/properties/orderers", - "default": Array [ - Object { + "default": [ + { "groupName": "group1", "instances": 1, "prefix": "orderer", "type": "solo", }, ], - "items": Object { + "items": { "$id": "#/properties/orgs/items/properties/orderers/items", - "properties": Object { - "groupName": Object { + "properties": { + "groupName": { "$id": "#/properties/orgs/items/properties/orderers/items/properties/groupName", - "pattern": "^[a-z0-9\\\\.\\\\-]+$", + "pattern": "^[a-z0-9\\.\\-]+$", "title": "Name od Orderer group", "type": "string", }, - "instances": Object { + "instances": { "$id": "#/properties/orgs/items/properties/orderers/items/properties/instances", "maximum": 9, "minimum": 1, "title": "Number of instances", "type": "integer", }, - "prefix": Object { + "prefix": { "$id": "#/properties/orgs/items/properties/orderers/items/properties/prefix", - "pattern": "^[a-z0-9\\\\.\\\\-]+$", + "pattern": "^[a-z0-9\\.\\-]+$", "title": "Domain prefix", "type": "string", }, - "type": Object { + "type": { "$id": "#/properties/orgs/items/properties/orderers/items/properties/type", "description": "The 'solo' consensus type may be used in development environment only. Use 'raft' in production.", - "enum": Array [ + "enum": [ "solo", "raft", ], @@ -425,7 +425,7 @@ Object { "type": "string", }, }, - "required": Array [ + "required": [ "groupName", "type", "instances", @@ -436,94 +436,94 @@ Object { "title": "Orderers", "type": "array", }, - "organization": Object { + "organization": { "$id": "#/properties/orgs/items/properties/organization", - "properties": Object { - "domain": Object { + "properties": { + "domain": { "$id": "#/properties/orgs/items/properties/organization/properties/domain", - "pattern": "^[a-z0-9\\\\.\\\\-]+$", + "pattern": "^[a-z0-9\\.\\-]+$", "title": "Domain", "type": "string", }, - "mspName": Object { + "mspName": { "$id": "#/properties/orgs/items/properties/organization/properties/mspName", "pattern": "^[a-zA-Z0-9]+$", "title": "MSP Name", "type": "string", }, - "name": Object { + "name": { "$id": "#/properties/orgs/items/properties/organization/properties/name", "pattern": "^[a-zA-Z0-9]+$", "title": "Name", "type": "string", }, }, - "required": Array [ + "required": [ "name", "domain", ], "title": "Basic information", "type": "object", }, - "peer": Object { + "peer": { "$id": "#/properties/orgs/items/properties/peer", - "properties": Object { - "anchorPeerInstances": Object { + "properties": { + "anchorPeerInstances": { "$id": "#/properties/orgs/items/properties/peer/properties/anchorPeerInstances", "maximum": 9, "minimum": 1, "title": "Number of anchor peer instances", "type": "integer", }, - "db": Object { + "db": { "$id": "#/properties/orgs/items/properties/peer/properties/db", - "enum": Array [ + "enum": [ "LevelDb", "CouchDb", ], "title": "Database Type", "type": "string", }, - "instances": Object { + "instances": { "$id": "#/properties/orgs/items/properties/peer/properties/instances", "maximum": 9, "minimum": 1, "title": "Number of instances", "type": "integer", }, - "prefix": Object { + "prefix": { "$id": "#/properties/orgs/items/properties/peer/properties/prefix", - "pattern": "^[a-z0-9\\\\.\\\\-]+$", + "pattern": "^[a-z0-9\\.\\-]+$", "title": "Domain prefix", "type": "string", }, }, - "required": Array [ + "required": [ "instances", ], "title": "Peer", "type": "object", }, - "tools": Object { + "tools": { "$id": "#/properties/orgs/items/properties/tools", - "properties": Object { - "explorer": Object { + "properties": { + "explorer": { "$id": "#/properties/orgs/items/properties/tools/properties/explorer", "title": "Blockchain Explorer enabled", "type": "boolean", }, - "fabloRest": Object { + "fabloRest": { "$id": "#/properties/orgs/items/properties/tools/properties/fabloRest", "title": "Fablo REST enabled", "type": "boolean", }, }, - "required": Array [], + "required": [], "title": "Tools", "type": "object", }, }, - "required": Array [ + "required": [ "organization", ], "title": "Organization", @@ -533,7 +533,7 @@ Object { "type": "array", }, }, - "required": Array [ + "required": [ "global", "orgs", "channels", From 43b1501bcb15af5d2e65b5dfe00f98db40976a2d Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Fri, 21 Jun 2024 11:33:06 +0200 Subject: [PATCH 55/83] Create ARCHITECTURE.md Signed-off-by: Jakub Dzikowski --- ARCHITECTURE.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ARCHITECTURE.md diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md new file mode 100644 index 00000000..207a562c --- /dev/null +++ b/ARCHITECTURE.md @@ -0,0 +1,24 @@ +# Fablo architecture + +Fablo is a tool that allows to setup a running Hyperledger Fabric network on the basis of a config file. + +The main flow of the application is presented in the diagram below (for instance for the `up` command): + +```mermaid +sequenceDiagram + actor User + User ->> fablo.sh: Call `up` command + fablo.sh ->> fablo-target: Verify if network files
are generated + alt no network files + fablo.sh ->> Fablo Docker: Generate network files + Fablo Docker ->> fablo-target: Generate network files
from `fablo-config.json`
and templates (Yeoman) + end + fablo.sh ->> fablo-target: Call `up` command + +``` + +There are three important layers in this flow: + +1. `fablo.sh` - this is our CLI. It accepts user commands, does some validation, and forwards them either to Fablo Docker container or generated network scripts in `fablo-target` directory. +2. Fablo Docker - is a Docker image that contains templates for generating the network files and Yeoman. When Fablo Docker is running, it has mounted `fablo-config.json` file from host and `fablo-target` directory. +3. `fablo-target` is a directory which contains generated Hyperledger Fabric network files (config files, helper scripts, temporary network files). From 5a407e4b23deee27d65e2729262d251762a899f4 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Fri, 21 Jun 2024 13:56:26 +0200 Subject: [PATCH 56/83] Add notable files and directories Signed-off-by: Jakub Dzikowski --- ARCHITECTURE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 207a562c..3cb4a770 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -22,3 +22,14 @@ There are three important layers in this flow: 1. `fablo.sh` - this is our CLI. It accepts user commands, does some validation, and forwards them either to Fablo Docker container or generated network scripts in `fablo-target` directory. 2. Fablo Docker - is a Docker image that contains templates for generating the network files and Yeoman. When Fablo Docker is running, it has mounted `fablo-config.json` file from host and `fablo-target` directory. 3. `fablo-target` is a directory which contains generated Hyperledger Fabric network files (config files, helper scripts, temporary network files). + +Notable files and directories: + +* `./src` - source code for Yeoman generators, containing subdirectories for given commands and EJS template files. +* `./fablo.sh` - Fablo CLI script. +* `./Dockerfile`, `./docker-entrypoint.sh`, `fablo-build.sh` - files that define and are used to build the Fablo Docker image. +* `e2e-network` - directory that contains integration tests written in Bash scripts. Their goal is to setup sample networks with Fablo and verify them. +* `e2e` - directory that contains integration tests for generating network target files. Tey are mostly Jest snapshot tests. +* `samples` - directory with sample Fablo config JSON and YAML files. + +See also [Contributing Guidelines](CONTRIBUTING.md), where you can find some more instructions how to run Fablo from source code and useful hints what needs to be done while working with the code. From ddbca51bbfe88e0f2b7d05679b0a790d3052b560 Mon Sep 17 00:00:00 2001 From: Akash Singh Date: Mon, 1 Jul 2024 07:07:56 +0530 Subject: [PATCH 57/83] chore: Refactor extendChaincodesConfig.ts to allow private data in chaincode Signed-off-by: Akash Singh --- src/extend-config/extendChaincodesConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extend-config/extendChaincodesConfig.ts b/src/extend-config/extendChaincodesConfig.ts index 86e07d19..da798204 100644 --- a/src/extend-config/extendChaincodesConfig.ts +++ b/src/extend-config/extendChaincodesConfig.ts @@ -21,7 +21,7 @@ const createPrivateCollectionConfig = ( // - requiredPeerCount -> minimal number of anchor peers from one organization in a channel const anchorPeerCountsInChannel = channel.orgs.map((o) => (o.anchorPeers || []).length); const maxPeerCount = anchorPeerCountsInChannel.reduce((a, b) => a + b, 0); - const requiredPeerCount = anchorPeerCountsInChannel.reduce((a, b) => Math.min(a, b), maxPeerCount) || 1; + const requiredPeerCount = anchorPeerCountsInChannel.reduce((a, b) => Math.min(a, b), maxPeerCount); const memberOnlyRead = version(fabricVersion).isGreaterOrEqual("1.4.0") ? { memberOnlyRead: true } : {}; const memberOnlyWrite = version(fabricVersion).isGreaterOrEqual("2.0.0") ? { memberOnlyWrite: true } : {}; From 810d6335db7a5b56a2e00fdf9613e5e72c4615df Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Tue, 16 Jul 2024 22:47:34 +0530 Subject: [PATCH 58/83] added the emit-error function also removed the unwanted files Signed-off-by: Sanket Teli --- e2e/__snapshots__/extendConfig.test.ts.snap | 6269 ----------------- ...-1chaincode-private-data.json.test.ts.snap | 3792 ---------- ...1.4-1org-1chaincode-raft.json.test.ts.snap | 3083 -------- ...-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 3900 ---------- ...2chaincodes-private-data.yaml.test.ts.snap | 3881 ---------- ...4-2orgs-2chaincodes-raft.json.test.ts.snap | 4291 ----------- ...2orgs-1chaincode-private-data.json.test.ts | 7 - ...g-hlf1.4-1org-1chaincode-raft.json.test.ts | 7 - ...onfig-hlf1.4-2orgs-1chaincode.json.test.ts | 7 - ...orgs-2chaincodes-private-data.yaml.test.ts | 7 - ...hlf1.4-2orgs-2chaincodes-raft.json.test.ts | 7 - e2e/fabloCommands.test.ts | 2 +- ...-hlf1.3-2orgs-1chaincode-private-data.json | 98 - ...lo-config-hlf1.4-1org-1chaincode-raft.json | 72 - .../fablo-config-hlf1.4-2orgs-1chaincode.json | 99 - ...hlf1.4-2orgs-2chaincodes-private-data.yaml | 57 - ...-config-hlf1.4-2orgs-2chaincodes-raft.json | 111 - src/validate/index.ts | 16 +- 18 files changed, 10 insertions(+), 25696 deletions(-) delete mode 100644 e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap delete mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap delete mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap delete mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap delete mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap delete mode 100644 e2e/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts delete mode 100644 e2e/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts delete mode 100644 e2e/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts delete mode 100644 e2e/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts delete mode 100644 e2e/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts delete mode 100644 samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json delete mode 100644 samples/fablo-config-hlf1.4-1org-1chaincode-raft.json delete mode 100644 samples/fablo-config-hlf1.4-2orgs-1chaincode.json delete mode 100644 samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml delete mode 100644 samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json diff --git a/e2e/__snapshots__/extendConfig.test.ts.snap b/e2e/__snapshots__/extendConfig.test.ts.snap index b1c297fa..b9dab976 100644 --- a/e2e/__snapshots__/extendConfig.test.ts.snap +++ b/e2e/__snapshots__/extendConfig.test.ts.snap @@ -1,6274 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`extend config samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -{ - "chaincodes": [ - { - "channel": { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 1, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - "directory": "./chaincodes/chaincode-kv-node-1.4", - "endorsement": "OR('Org1MSP.member', 'Org2MSP.member')", - "init": "{"Args":[]}", - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "lang": "node", - "name": "chaincode1", - "privateData": [ - { - "blockToLive": 0, - "maxPeerCount": 3, - "name": "org1-collection", - "policy": "OR('Org1MSP.member')", - "requiredPeerCount": 1, - }, - { - "blockToLive": 0, - "maxPeerCount": 3, - "name": "org2-collection", - "policy": "OR('Org2MSP.member')", - "requiredPeerCount": 1, - }, - ], - "privateDataConfigFile": "collections/chaincode1.json", - "version": "0.0.1", - }, - ], - "channels": [ - { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 1, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - ], - "global": { - "capabilities": { - "application": "V1_3", - "channel": "V1_3", - "isV2": false, - "orderer": "V1_1", - }, - "engine": "docker", - "fabricBaseosVersion": "0.4.9", - "fabricCaVersion": "1.3.0", - "fabricCcenvVersion": "1.3.0", - "fabricJavaenvVersion": "1.3", - "fabricNodeenvVersion": "1.3", - "fabricRecommendedNodeVersion": "12", - "fabricVersion": "1.3.0", - "monitoring": { - "loglevel": "info", - }, - "paths": { - "chaincodesBaseDir": "", - "fabloConfig": "", - }, - "tls": false, - "tools": {}, - }, - "hooks": { - "postGenerate": "", - }, - "orderedHeadsDistinct": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "ordererGroups": [ - { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - ], - "orgs": [ - { - "anchorPeers": [], - "bootstrapPeers": """", - "ca": { - "address": "ca.orderer.example.com", - "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", - "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7020, - "fullAddress": "ca.orderer.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.orderer.example.com", - }, - "cryptoConfigFileName": "crypto-config-orderer", - "domain": "orderer.example.com", - "headPeer": undefined, - "mspName": "OrdererMSP", - "name": "Orderer", - "ordererGroups": [ - { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - ], - "peers": [], - "peersCount": 0, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 1, - "tools": {}, - }, - ], -} -`; - -exports[`extend config samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -{ - "chaincodes": [ - { - "channel": { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "etcdraft", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - "directory": "./chaincodes/chaincode-kv-node-1.4", - "endorsement": "AND ('Org1MSP.member')", - "init": "{"Args":[]}", - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "lang": "node", - "name": "chaincode1", - "privateData": [], - "privateDataConfigFile": undefined, - "version": "0.0.1", - }, - ], - "channels": [ - { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "etcdraft", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - ], - "global": { - "capabilities": { - "application": "V1_4_2", - "channel": "V1_4_3", - "isV2": false, - "orderer": "V1_4_2", - }, - "engine": "docker", - "fabricBaseosVersion": "0.4.9", - "fabricCaVersion": "1.4.6", - "fabricCcenvVersion": "1.4.6", - "fabricJavaenvVersion": "1.4", - "fabricNodeenvVersion": "1.4", - "fabricRecommendedNodeVersion": "12", - "fabricVersion": "1.4.6", - "monitoring": { - "loglevel": "debug", - }, - "paths": { - "chaincodesBaseDir": "", - "fabloConfig": "", - }, - "tls": true, - "tools": {}, - }, - "hooks": { - "postGenerate": "", - }, - "orderedHeadsDistinct": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "ordererGroups": [ - { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "etcdraft", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - ], - "orgs": [ - { - "anchorPeers": [], - "bootstrapPeers": """", - "ca": { - "address": "ca.orderer.example.com", - "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", - "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7020, - "fullAddress": "ca.orderer.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.orderer.example.com", - }, - "cryptoConfigFileName": "crypto-config-orderer", - "domain": "orderer.example.com", - "headPeer": undefined, - "mspName": "OrdererMSP", - "name": "Orderer", - "ordererGroups": [ - { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "etcdraft", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - ], - "peers": [], - "peersCount": 0, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], -} -`; - -exports[`extend config samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -{ - "chaincodes": [ - { - "channel": { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - "directory": "./chaincodes/chaincode-kv-node-1.4", - "endorsement": "AND ('Org1MSP.member', 'Org2MSP.member')", - "init": "{"Args":[]}", - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "lang": "node", - "name": "chaincode1", - "privateData": [], - "privateDataConfigFile": undefined, - "version": "0.0.1", - }, - ], - "channels": [ - { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel2", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], - "profileName": "MyChannel2", - }, - ], - "global": { - "capabilities": { - "application": "V1_4_2", - "channel": "V1_4_3", - "isV2": false, - "orderer": "V1_4_2", - }, - "engine": "docker", - "fabricBaseosVersion": "0.4.9", - "fabricCaVersion": "1.4.6", - "fabricCcenvVersion": "1.4.6", - "fabricJavaenvVersion": "1.4", - "fabricNodeenvVersion": "1.4", - "fabricRecommendedNodeVersion": "12", - "fabricVersion": "1.4.6", - "monitoring": { - "loglevel": "info", - }, - "paths": { - "chaincodesBaseDir": "", - "fabloConfig": "", - }, - "tls": false, - "tools": {}, - }, - "hooks": { - "postGenerate": "", - }, - "orderedHeadsDistinct": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "ordererGroups": [ - { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - ], - "orgs": [ - { - "anchorPeers": [], - "bootstrapPeers": """", - "ca": { - "address": "ca.orderer.example.com", - "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", - "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7020, - "fullAddress": "ca.orderer.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.orderer.example.com", - }, - "cryptoConfigFileName": "crypto-config-orderer", - "domain": "orderer.example.com", - "headPeer": undefined, - "mspName": "OrdererMSP", - "name": "Orderer", - "ordererGroups": [ - { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - ], - "peers": [], - "peersCount": 0, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], -} -`; - -exports[`extend config samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -{ - "chaincodes": [ - { - "channel": { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 1, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - "directory": "./chaincodes/chaincode-kv-node-1.4", - "endorsement": "OR('Org1MSP.member', 'Org2MSP.member')", - "init": "{"Args":[]}", - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "lang": "node", - "name": "or-policy-chaincode", - "privateData": [ - { - "blockToLive": 0, - "maxPeerCount": 3, - "memberOnlyRead": true, - "name": "org1-collection", - "policy": "OR('Org1MSP.member')", - "requiredPeerCount": 1, - }, - ], - "privateDataConfigFile": "collections/or-policy-chaincode.json", - "version": "0.0.1", - }, - { - "channel": { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 1, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - "directory": "./chaincodes/chaincode-kv-node-1.4", - "endorsement": "AND('Org1MSP.member', 'Org2MSP.member')", - "init": "{"Args":[]}", - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "lang": "node", - "name": "and-policy-chaincode", - "privateData": [ - { - "blockToLive": 0, - "maxPeerCount": 3, - "memberOnlyRead": true, - "name": "org1-collection", - "policy": "OR('Org1MSP.member')", - "requiredPeerCount": 1, - }, - ], - "privateDataConfigFile": "collections/and-policy-chaincode.json", - "version": "0.0.1", - }, - ], - "channels": [ - { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 1, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - ], - "global": { - "capabilities": { - "application": "V1_4_2", - "channel": "V1_4_3", - "isV2": false, - "orderer": "V1_4_2", - }, - "engine": "docker", - "fabricBaseosVersion": "0.4.9", - "fabricCaVersion": "1.5.5", - "fabricCcenvVersion": "1.4.11", - "fabricJavaenvVersion": "1.4", - "fabricNodeenvVersion": "1.4", - "fabricRecommendedNodeVersion": "12", - "fabricVersion": "1.4.11", - "monitoring": { - "loglevel": "info", - }, - "paths": { - "chaincodesBaseDir": "", - "fabloConfig": "", - }, - "tls": false, - "tools": {}, - }, - "hooks": { - "postGenerate": "", - }, - "orderedHeadsDistinct": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "ordererGroups": [ - { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - ], - "orgs": [ - { - "anchorPeers": [], - "bootstrapPeers": """", - "ca": { - "address": "ca.orderer.example.com", - "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", - "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7020, - "fullAddress": "ca.orderer.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.orderer.example.com", - }, - "cryptoConfigFileName": "crypto-config-orderer", - "domain": "orderer.example.com", - "headPeer": undefined, - "mspName": "OrdererMSP", - "name": "Orderer", - "ordererGroups": [ - { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "solo", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "solo", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "profileName": "Group1Genesis", - }, - ], - "peers": [], - "peersCount": 0, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "bootstrapPeers": "peer0.org2.example.com:7061", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 1, - "tools": {}, - }, - ], -} -`; - -exports[`extend config samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -{ - "chaincodes": [ - { - "channel": { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "etcdraft", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - { - "address": "orderer1.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer1.group1.orderer.example.com:7031", - "name": "orderer1.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7031, - }, - { - "address": "orderer2.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer2.group1.orderer.example.com:7032", - "name": "orderer2.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7032, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - "directory": "./chaincodes/chaincode-kv-node-1.4", - "endorsement": "OR ('Org1MSP.member', 'Org2MSP.member')", - "init": "{"Args":[]}", - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "lang": "node", - "name": "chaincode1", - "privateData": [], - "privateDataConfigFile": undefined, - "version": "0.0.1", - }, - { - "channel": { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel2", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "etcdraft", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - { - "address": "orderer1.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer1.group1.orderer.example.com:7031", - "name": "orderer1.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7031, - }, - { - "address": "orderer2.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer2.group1.orderer.example.com:7032", - "name": "orderer2.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7032, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], - "profileName": "MyChannel2", - }, - "directory": "./chaincodes/chaincode-java-simple", - "endorsement": "OR ('Org1MSP.member', 'Org2MSP.member')", - "init": "{"Args":[]}", - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "lang": "java", - "name": "chaincode2", - "privateData": [], - "privateDataConfigFile": undefined, - "version": "0.0.1", - }, - ], - "channels": [ - { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel1", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "etcdraft", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - { - "address": "orderer1.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer1.group1.orderer.example.com:7031", - "name": "orderer1.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7031, - }, - { - "address": "orderer2.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer2.group1.orderer.example.com:7032", - "name": "orderer2.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7032, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], - "profileName": "MyChannel1", - }, - { - "instantiatingOrg": { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - "name": "my-channel2", - "ordererGroup": { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "etcdraft", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - { - "address": "orderer1.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer1.group1.orderer.example.com:7031", - "name": "orderer1.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7031, - }, - { - "address": "orderer2.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer2.group1.orderer.example.com:7032", - "name": "orderer2.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7032, - }, - ], - "profileName": "Group1Genesis", - }, - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "orgs": [ - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], - "profileName": "MyChannel2", - }, - ], - "global": { - "capabilities": { - "application": "V1_4_2", - "channel": "V1_4_3", - "isV2": false, - "orderer": "V1_4_2", - }, - "engine": "docker", - "fabricBaseosVersion": "0.4.9", - "fabricCaVersion": "1.4.6", - "fabricCcenvVersion": "1.4.6", - "fabricJavaenvVersion": "1.4", - "fabricNodeenvVersion": "1.4", - "fabricRecommendedNodeVersion": "12", - "fabricVersion": "1.4.6", - "monitoring": { - "loglevel": "info", - }, - "paths": { - "chaincodesBaseDir": "", - "fabloConfig": "", - }, - "tls": true, - "tools": {}, - }, - "hooks": { - "postGenerate": "", - }, - "orderedHeadsDistinct": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "ordererGroups": [ - { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "etcdraft", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHead": { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - { - "address": "orderer1.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer1.group1.orderer.example.com:7031", - "name": "orderer1.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7031, - }, - { - "address": "orderer2.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer2.group1.orderer.example.com:7032", - "name": "orderer2.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7032, - }, - ], - "profileName": "Group1Genesis", - }, - ], - "orgs": [ - { - "anchorPeers": [], - "bootstrapPeers": """", - "ca": { - "address": "ca.orderer.example.com", - "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", - "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7020, - "fullAddress": "ca.orderer.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.orderer.example.com", - }, - "cryptoConfigFileName": "crypto-config-orderer", - "domain": "orderer.example.com", - "headPeer": undefined, - "mspName": "OrdererMSP", - "name": "Orderer", - "ordererGroups": [ - { - "configtxOrdererDefaults": "Group1Defaults", - "consensus": "etcdraft", - "genesisBlockName": "Group1Genesis.block", - "hostingOrgs": [ - "Orderer", - ], - "name": "group1", - "ordererHeads": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - ], - "orderers": [ - { - "address": "orderer0.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer0.group1.orderer.example.com:7030", - "name": "orderer0.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7030, - }, - { - "address": "orderer1.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer1.group1.orderer.example.com:7031", - "name": "orderer1.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7031, - }, - { - "address": "orderer2.group1.orderer.example.com", - "consensus": "etcdraft", - "domain": "orderer.example.com", - "fullAddress": "orderer2.group1.orderer.example.com:7032", - "name": "orderer2.group1", - "orgMspName": "OrdererMSP", - "orgName": "Orderer", - "port": 7032, - }, - ], - "profileName": "Group1Genesis", - }, - ], - "peers": [], - "peersCount": 0, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", - "ca": { - "address": "ca.org1.example.com", - "caAdminNameVar": "ORG1_CA_ADMIN_NAME", - "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7040, - "fullAddress": "ca.org1.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org1.example.com", - }, - "cryptoConfigFileName": "crypto-config-org1", - "domain": "org1.example.com", - "headPeer": { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - "mspName": "Org1MSP", - "name": "Org1", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org1.example.com", - "couchDbExposePort": 5100, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org1.example.com:7041", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7041, - }, - { - "address": "peer1.org1.example.com", - "couchDbExposePort": 5101, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org1.example.com:7042", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7042, - }, - ], - "peersCount": 2, - "tools": {}, - }, - { - "anchorPeers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "bootstrapPeers": ""peer0.org2.example.com:7061 peer1.org2.example.com:7062"", - "ca": { - "address": "ca.org2.example.com", - "caAdminNameVar": "ORG2_CA_ADMIN_NAME", - "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", - "db": "sqlite", - "exposePort": 7060, - "fullAddress": "ca.org2.example.com:7054", - "port": 7054, - "prefix": "ca", - }, - "cli": { - "address": "cli.org2.example.com", - }, - "cryptoConfigFileName": "crypto-config-org2", - "domain": "org2.example.com", - "headPeer": { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - "mspName": "Org2MSP", - "name": "Org2", - "ordererGroups": [], - "peers": [ - { - "address": "peer0.org2.example.com", - "couchDbExposePort": 5120, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer0.org2.example.com:7061", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer0", - "port": 7061, - }, - { - "address": "peer1.org2.example.com", - "couchDbExposePort": 5121, - "db": { - "type": "LevelDb", - }, - "fullAddress": "peer1.org2.example.com:7062", - "gatewayEnabled": false, - "isAnchorPeer": true, - "name": "peer1", - "port": 7062, - }, - ], - "peersCount": 2, - "tools": {}, - }, - ], -} -`; - exports[`extend config samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` { "chaincodes": [ diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap deleted file mode 100644 index 1bb5db87..00000000 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ /dev/null @@ -1,3792 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"/config -/crypto-config -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/collections/chaincode1.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"[ - { - "name": "org1-collection", - "policy": "OR('Org1MSP.member')", - "requiredPeerCount": 1, - "maxPeerCount": 3, - "blockToLive": 0 - }, - { - "name": "org2-collection", - "policy": "OR('Org2MSP.member')", - "requiredPeerCount": 1, - "maxPeerCount": 3, - "blockToLive": 0 - } -]" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"################################################################################ -# SECTION: Capabilities -################################################################################ -Capabilities: - Channel: &ChannelCapabilities - V1_3: true - Orderer: &OrdererCapabilities - V1_1: true - Application: &ApplicationCapabilities - V1_3: true - -################################################################################ -# CHANNEL Defaults -################################################################################ -Channel: &ChannelDefaults - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - Capabilities: - <<: *ChannelCapabilities - -################################################################################ -# Section: Organizations -################################################################################ -Organizations: - - &Orderer - Name: OrdererMSP - ID: OrdererMSP - MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('OrdererMSP.member')" - Writers: - Type: Signature - Rule: "OR('OrdererMSP.member')" - Admins: - Type: Signature - Rule: "OR('OrdererMSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('OrdererMSP.member')" - - AnchorPeers: - - - &Org1 - Name: Org1MSP - ID: Org1MSP - MSPDir: crypto-config/peerOrganizations/org1.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('Org1MSP.member')" - Writers: - Type: Signature - Rule: "OR('Org1MSP.member')" - Admins: - Type: Signature - Rule: "OR('Org1MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('Org1MSP.member')" - - AnchorPeers: - - Host: peer0.org1.example.com - Port: 7041 - - - Host: peer1.org1.example.com - Port: 7042 - - - &Org2 - Name: Org2MSP - ID: Org2MSP - MSPDir: crypto-config/peerOrganizations/org2.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('Org2MSP.member')" - Writers: - Type: Signature - Rule: "OR('Org2MSP.member')" - Admins: - Type: Signature - Rule: "OR('Org2MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('Org2MSP.member')" - - AnchorPeers: - - Host: peer0.org2.example.com - Port: 7061 - -################################################################################ -# SECTION: Application -################################################################################ -Application: &ApplicationDefaults - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Application policies, their canonical path is - # /Channel/Application/ - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - Endorsement: - Type: ImplicitMeta - Rule: "MAJORITY Endorsement" - Capabilities: - <<: *ApplicationCapabilities - -################################################################################ -# SECTION: Orderer -################################################################################ -Orderer: &Group1Defaults - OrdererType: solo - Addresses: - - orderer0.group1.orderer.example.com:7030 - BatchTimeout: 2s - BatchSize: - MaxMessageCount: 10 - AbsoluteMaxBytes: 99 MB - PreferredMaxBytes: 512 KB - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Orderer policies, their canonical path is - # /Channel/Orderer/ - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - # BlockValidation specifies what signatures must be included in the block - # from the orderer for the peer to validate it. - BlockValidation: - Type: ImplicitMeta - Rule: "ANY Writers" - Capabilities: - <<: *OrdererCapabilities - -################################################################################ -# Profile -################################################################################ -# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml - -Profiles: - # Profile used to create Genesis block for group group1 # - Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel1 # - MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"{ - "name": "fablo-test-network-orderer", - "description": "Connection profile for Orderer in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Orderer" - }, - "organizations": { - "Orderer": { - "mspid": "OrdererMSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com" - ], - "certificateAuthorities": [ - "ca.orderer.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpc://localhost:7041" - }, - "peer1.org1.example.com": { - "url": "grpc://localhost:7042" - }, - "peer0.org2.example.com": { - "url": "grpc://localhost:7061" - } - }, - "certificateAuthorities": { - "ca.orderer.example.com": { - "url": "http://localhost:7020", - "caName": "ca.orderer.example.com", - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"name: fablo-test-network-orderer -description: Connection profile for Orderer in Fablo network -version: 1.0.0 -client: - organization: Orderer -organizations: - Orderer: - mspid: OrdererMSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.orderer.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.orderer.example.com: - url: http://localhost:7020 - caName: ca.orderer.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"{ - "name": "fablo-test-network-org1", - "description": "Connection profile for Org1 in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Org1" - }, - "organizations": { - "Org1": { - "mspid": "Org1MSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com" - ], - "certificateAuthorities": [ - "ca.org1.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpc://localhost:7041" - }, - "peer1.org1.example.com": { - "url": "grpc://localhost:7042" - }, - "peer0.org2.example.com": { - "url": "grpc://localhost:7061" - } - }, - "certificateAuthorities": { - "ca.org1.example.com": { - "url": "http://localhost:7040", - "caName": "ca.org1.example.com", - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"name: fablo-test-network-org1 -description: Connection profile for Org1 in Fablo network -version: 1.0.0 -client: - organization: Org1 -organizations: - Org1: - mspid: Org1MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.org1.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.org1.example.com: - url: http://localhost:7040 - caName: ca.org1.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"{ - "name": "fablo-test-network-org2", - "description": "Connection profile for Org2 in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Org2" - }, - "organizations": { - "Org2": { - "mspid": "Org2MSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com" - ], - "certificateAuthorities": [ - "ca.org2.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpc://localhost:7041" - }, - "peer1.org1.example.com": { - "url": "grpc://localhost:7042" - }, - "peer0.org2.example.com": { - "url": "grpc://localhost:7061" - } - }, - "certificateAuthorities": { - "ca.org2.example.com": { - "url": "http://localhost:7060", - "caName": "ca.org2.example.com", - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"name: fablo-test-network-org2 -description: Connection profile for Org2 in Fablo network -version: 1.0.0 -client: - organization: Org2 -organizations: - Org2: - mspid: Org2MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.org2.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.org2.example.com: - url: http://localhost:7060 - caName: ca.org2.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"PeerOrgs: - - Name: Orderer - Domain: orderer.example.com - Specs: - - Hostname: orderer0.group1 - Template: - Count: 0 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"PeerOrgs: - - Name: Org1 - Domain: org1.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"PeerOrgs: - - Name: Org2 - Domain: org2.example.com - Specs: - Template: - Count: 1 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"{ - "network-configs": { - "network-org1": { - "name": "Network of Org1", - "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" - }, - "network-org2": { - "name": "Network of Org2", - "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" - } - }, - "license": "Apache-2.0" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - orderer: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org1: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org2: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" - -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/.env" -source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" - -networkUp() { - generateArtifacts - startNetwork - generateChannelsArtifacts - installChannels - installChaincodes - notifyOrgsAboutChannels - printStartSuccessInfo -} - -if [ "$1" = "up" ]; then - networkUp -elif [ "$1" = "down" ]; then - networkDown -elif [ "$1" = "reset" ]; then - networkDown - networkUp -elif [ "$1" = "start" ]; then - startNetwork -elif [ "$1" = "stop" ]; then - stopNetwork -elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then - installChaincodes -elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then - installChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then - upgradeChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then - runDevModeChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then - chaincodeInvoke "$3" "$4" "$5" "$6" "$7" -elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then - chaincodeList "$3" "$4" -elif [ "$1" = "channel" ]; then - channelQuery "\${@:2}" -elif [ "$1" = "snapshot" ]; then - createSnapshot "$2" -elif [ "$1" = "clone-to" ]; then - cloneSnapshot "$2" "\${3:-""}" -elif [ "$1" = "help" ]; then - printHelp -elif [ "$1" = "--help" ]; then - printHelp -else - echo "No command specified" - echo "Basic commands are: up, down, start, stop, reset" - echo "To list channel query helper commands type: 'fablo channel --help'" - echo "Also check: 'chaincode install'" - echo "Use 'help' or '--help' for more information" -fi -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"FABLO_VERSION=1.2.1-unstable.0 -FABLO_BUILD= -FABLO_REST_VERSION=0.1.0 -HYPERLEDGER_EXPLORER_VERSION=1.1.8 - -COUCHDB_VERSION=3.1 -FABRIC_COUCHDB_VERSION=0.4.18 - -FABLO_CONFIG= -CHAINCODES_BASE_DIR= - -COMPOSE_PROJECT_NAME= -LOGGING_LEVEL=info - -FABRIC_VERSION=1.3.0 -FABRIC_CA_VERSION=1.3.0 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=1.3.0 -FABRIC_BASEOS_VERSION=0.4.9 -FABRIC_JAVAENV_VERSION=1.3 -FABRIC_NODEENV_VERSION=1.3 -RECOMMENDED_NODE_VERSION=12 - -ROOT_CA_ADMIN_NAME=admin -ROOT_CA_ADMIN_PASSWORD=adminpw - -ORDERER_CA_ADMIN_NAME=admin -ORDERER_CA_ADMIN_PASSWORD=adminpw - -ORG1_CA_ADMIN_NAME=admin -ORG1_CA_ADMIN_PASSWORD=adminpw - -ORG2_CA_ADMIN_NAME=admin -ORG2_CA_ADMIN_PASSWORD=adminpw - -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -chaincodeList() { - if [ "$#" -ne 2 ]; then - echo "Expected 2 parameters for chaincode list, but got: $*" - exit 1 - - elif [ "$1" = "peer0.org1.example.com" ]; then - - peerChaincodeList "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" # $2 is channel name - - elif - [ "$1" = "peer1.org1.example.com" ] - then - - peerChaincodeList "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" # $2 is channel name - - elif - [ "$1" = "peer0.org2.example.com" ] - then - - peerChaincodeList "cli.org2.example.com" "peer0.org2.example.com:7061" "$2" # $2 is channel name - - else - - echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" - exit 1 - - fi -} - -# Function to perform chaincode invoke. Accepts 5 parameters: -# 1. comma-separated peers -# 2. channel name -# 3. chaincode name -# 4. chaincode command -# 5. transient data (optional) -chaincodeInvoke() { - if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then - echo "Expected 4 or 5 parameters for chaincode list, but got: $*" - echo "Usage: fablo chaincode invoke [transient]" - exit 1 - fi - cli="" - peer_addresses="" - - if [[ "$1" == *"peer0.org1.example.com"* ]]; then - cli="cli.org1.example.com" - peer_addresses="$peer_addresses,peer0.org1.example.com:7041" - - fi - if [[ "$1" == *"peer1.org1.example.com"* ]]; then - cli="cli.org1.example.com" - peer_addresses="$peer_addresses,peer1.org1.example.com:7042" - - fi - if [[ "$1" == *"peer0.org2.example.com"* ]]; then - cli="cli.org2.example.com" - peer_addresses="$peer_addresses,peer0.org2.example.com:7061" - - fi - if [ -z "$peer_addresses" ]; then - echo "Unknown peers: $1" - exit 1 - fi - - peerChaincodeInvoke "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" - -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" - -set -eu - -channelQuery() { - echo "-> Channel query: " + "$@" - - if [ "$#" -eq 1 ]; then - printChannelsHelp - - elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - - peerChannelList "cli.org1.example.com" "peer0.org1.example.com:7041" - - elif - [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] - then - - peerChannelList "cli.org1.example.com" "peer1.org1.example.com:7042" - - elif - [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] - then - - peerChannelList "cli.org2.example.com" "peer0.org2.example.com:7061" - - elif - - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] - then - - peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] - then - - peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer1.org1.example.com:7042" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] - then - - peerChannelGetInfo "my-channel1" "cli.org2.example.com" "peer0.org2.example.com:7061" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfig "my-channel1" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlock "my-channel1" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "$TARGET_FILE" - - else - - echo "$@" - echo "$1, $2, $3, $4, $5, $6, $7, $#" - printChannelsHelp - fi - -} - -printChannelsHelp() { - echo "Channel management commands:" - echo "" - - echo "fablo channel list org1 peer0" - echo -e "\\t List channels on 'peer0' of 'Org1'". - echo "" - - echo "fablo channel list org1 peer1" - echo -e "\\t List channels on 'peer1' of 'Org1'". - echo "" - - echo "fablo channel list org2 peer0" - echo -e "\\t List channels on 'peer0' of 'Org2'". - echo "" - - echo "fablo channel getinfo my-channel1 org1 peer0" - echo -e "\\t Get channel info on 'peer0' of 'Org1'". - echo "" - echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". - echo "" - echo "fablo channel fetch my-channel1 org1 peer0 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". - echo "" - - echo "fablo channel getinfo my-channel1 org1 peer1" - echo -e "\\t Get channel info on 'peer1' of 'Org1'". - echo "" - echo "fablo channel fetch config my-channel1 org1 peer1 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". - echo "" - echo "fablo channel fetch my-channel1 org1 peer1 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". - echo "" - - echo "fablo channel getinfo my-channel1 org2 peer0" - echo -e "\\t Get channel info on 'peer0' of 'Org2'". - echo "" - echo "fablo channel fetch config my-channel1 org2 peer0 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". - echo "" - echo "fablo channel fetch my-channel1 org2 peer0 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". - echo "" - -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -generateArtifacts() { - printHeadline "Generating basic configs" "U1F913" - - printItalics "Generating crypto material for Orderer" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating crypto material for Org1" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating crypto material for Org2" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating genesis block for group group1" "U1F3E0" - genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" - - # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" -} - -startNetwork() { - printHeadline "Starting network" "U1F680" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) - sleep 4 -} - -generateChannelsArtifacts() { - printHeadline "Generating config for 'my-channel1'" "U1F913" - createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" -} - -installChannels() { - printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" - docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - - printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" - docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" - docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" -} - -installChaincodes() { - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/chaincode1.json" - else - echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - -} - -installChaincode() { - local chaincodeName="$1" - if [ -z "$chaincodeName" ]; then - echo "Error: chaincode name is not provided" - exit 1 - fi - - local version="$2" - if [ -z "$version" ]; then - echo "Error: chaincode version is not provided" - exit 1 - fi - - if [ "$chaincodeName" = "chaincode1" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/chaincode1.json" - - else - echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi -} - -runDevModeChaincode() { - echo "Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities" - exit 1 -} - -upgradeChaincode() { - local chaincodeName="$1" - if [ -z "$chaincodeName" ]; then - echo "Error: chaincode name is not provided" - exit 1 - fi - - local version="$2" - if [ -z "$version" ]; then - echo "Error: chaincode version is not provided" - exit 1 - fi - - if [ "$chaincodeName" = "chaincode1" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - - printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'" "U1F618" - chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/chaincode1.json" - - else - echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi -} - -notifyOrgsAboutChannels() { - printHeadline "Creating new channel config blocks" "U1F537" - createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - createNewChannelUpdateTx "my-channel1" "Org2MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - - printHeadline "Notyfing orgs about channels" "U1F4E2" - notifyOrgAboutNewChannel "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" - notifyOrgAboutNewChannel "my-channel1" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" - - printHeadline "Deleting new channel config blocks" "U1F52A" - deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" - deleteNewChannelUpdateTx "my-channel1" "Org2MSP" "cli.org2.example.com" -} - -printStartSuccessInfo() { - printHeadline "Done! Enjoy your fresh network" "U1F984" -} - -stopNetwork() { - printHeadline "Stopping network" "U1F68F" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) - sleep 4 -} - -networkDown() { - printHeadline "Destroying network" "U1F916" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - - printf "Removing chaincode containers & images... \\U1F5D1 \\n" - for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer1.org1.example.com-chaincode1" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer1.org1.example.com-chaincode1*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer0.org2.example.com-chaincode1" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org2.example.com-chaincode1*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - - printf "Removing generated configs... \\U1F5D1 \\n" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - - printHeadline "Done! Network was purged" "U1F5D1" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"version: '2.2' - -networks: - basic: - -services: - - ca.orderer.example.com: - container_name: ca.orderer.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7020:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.orderer.example.com: - container_name: cli.orderer.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.orderer.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=OrdererMSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - - "../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json" - networks: - - basic - - orderer0.group1.orderer.example.com: - container_name: orderer0.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7030 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7030:7030 - - 8030:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - ca.org1.example.com: - container_name: ca.org1.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7040:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org1.example.com: - container_name: cli.org1.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org1.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - - "../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json" - networks: - - basic - - peer0.org1.example.com: - container_name: peer0.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer0.org1.example.com - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8041:9440 - - 7041:7041 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org1.example.com: - container_name: peer1.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer1.org1.example.com - - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8042:9440 - - 7042:7042 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - - ca.org2.example.com: - container_name: ca.org2.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7060:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org2.example.com: - container_name: cli.org2.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org2.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - - "../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json" - networks: - - basic - - peer0.org2.example.com: - container_name: peer0.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer0.org2.example.com - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7061 - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8061:9440 - - 7061:7061 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -certsGenerate() { - local CONTAINER_NAME=certsGenerate - - local CONFIG_PATH=$1 - local CRYPTO_CONFIG_FILE_NAME=$2 - local ORG_PATH=$3 - local OUTPUT_PATH=$4 - local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - - echo "Generating certs..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" - inputLog "ORG_PATH: $ORG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - - if [ -d "$FULL_CERT_PATH" ]; then - echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME - - # shellcheck disable=2044 - for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do - dir=$(dirname "$file") - mv "\${dir}"/*_sk "\${dir}"/priv-key.pem - done -} - -genesisBlockCreate() { - local CONTAINER_NAME=genesisBlockCreate - - local CONFIG_PATH=$1 - local OUTPUT_PATH=$2 - local GENESIS_PROFILE_NAME=$3 - local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - - echo "Creating genesis block..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" - inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - - if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then - echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - - mkdir -p "$OUTPUT_PATH" - docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createChannelTx() { - local CONTAINER_NAME=createChannelTx - - local CHANNEL_NAME=$1 - local CONFIG_PATH=$2 - local CONFIG_PROFILE=$3 - local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - - echo "Creating channelTx for $CHANNEL_NAME..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - - if [ -f "$CHANNEL_TX_PATH" ]; then - echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createNewChannelUpdateTx() { - local CONTAINER_NAME=createAnchorPeerUpdateTx - - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CONFIG_PROFILE=$3 - local CONFIG_PATH=$4 - local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then - echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\ - --configPath ./fabric-config \\ - -profile "\${CONFIG_PROFILE}" \\ - -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ - -channelID "\${CHANNEL_NAME}" \\ - -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -notifyOrgAboutNewChannel() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel update \\ - -c "$CHANNEL_NAME" \\ - -o "$ORDERER_URL" \\ - -f "$ANCHOR_PEER_UPDATE_PATH" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -notifyOrgAboutNewChannelTls() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - local CA_CERT="/var/hyperledger/cli/"\${6} - - echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel update \\ - -c "$CHANNEL_NAME" \\ - -o "$ORDERER_URL" \\ - -f "$ANCHOR_PEER_UPDATE_PATH" \\ - --tls --cafile "$CA_CERT" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -deleteNewChannelUpdateTx() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" - inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -printHeadline() { - bold=$'\\e[1m' - end=$'\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" -} - -printItalics() { - italics=$'\\e[3m' - end=$'\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" -} - -inputLog() { - end=$'\\e[0m' - darkGray=$'\\e[90m' - - echo "\${darkGray} $1 \${end}" -} - -inputLogShort() { - end=$'\\e[0m' - darkGray=$'\\e[90m' - - echo "\${darkGray} $1 \${end}" -} - -certsRemove() { - local CERTS_DIR_PATH=$1 - rm -rf "$CERTS_DIR_PATH" -} - -removeContainer() { - CONTAINER_NAME=$1 - docker rm -f "$CONTAINER_NAME" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -printHelp() { - echo "Fablo is powered by SoftwareMill" - - echo "" - echo "usage: ./fabric-docker.sh " - echo "" - - echo "Commands: " - echo "" - echo "./fabric-docker.sh up" - echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." - echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" - echo "" - echo "./fabric-docker.sh down" - echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." - echo "" - echo "./fabric-docker.sh start" - echo -e "\\t Starts already created network." - echo "" - echo "./fabric-docker.sh stop" - echo -e "\\t Stops already running network." - echo "" - echo "./fabric-docker.sh reset" - echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." - echo "" - echo "./fabric-docker.sh channel --help" - echo -e "\\t Detailed help for channel management scripts." - echo "" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash -# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. -# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u - -dockerPullIfMissing() { - local IMAGE="$1" - if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then - docker pull --platform linux/x86_64 "$IMAGE" - fi -} - -chaincodeBuild() { - local CHAINCODE_NAME=$1 - local CHAINCODE_LANG=$2 - local CHAINCODE_DIR_PATH=$3 - local RECOMMENDED_NODE_VERSION=$4 - - mkdir -p "$CHAINCODE_DIR_PATH" - - # pull required images upfront in case of arm64 (Apple Silicon) architecture - # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ "$(uname -m)" = "arm64" ]; then - if [ "$CHAINCODE_LANG" = "node" ]; then - dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" - fi - if [ "$CHAINCODE_LANG" = "java" ]; then - dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" - fi - if [ "$CHAINCODE_LANG" = "golang" ]; then - dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" - fi - fi - - if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" - set +u - nvm install - set -u - cd "$current_dir" - fi - fi - - NODE_VERSION="$(node --version)" - - USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" - if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then - RECOMMENDED_NODE_VERSION="8.9" - fi - - if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then - echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" - echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" - fi - - echo "Buiding chaincode '$CHAINCODE_NAME'..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" - inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - - # We have different commands for npm and yarn - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) - else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) - fi - fi -} - -chaincodeInstall() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local CA_CERT=$8 - - echo "Installing chaincode on $CHANNEL_NAME..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CHANNEL_NAME="$CHANNEL_NAME" "$CLI_NAME" peer chaincode install \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -p "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ - -o "$ORDERER_URL" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} - -chaincodeInstantiate() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo "Instantiating chaincode on $CHANNEL_NAME..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" - inputLog "INIT_PARAMS: $INIT_PARAMS" - inputLog "ENDORSEMENT: $ENDORSEMENT" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n "$COLLECTIONS_CONFIG" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode instantiate \\ - -C "$CHANNEL_NAME" \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -o "$ORDERER_URL" \\ - -c "$INIT_PARAMS" \\ - -P "$ENDORSEMENT" \\ - "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} - -chaincodeUpgrade() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo "Upgrading chaincode on $CHANNEL_NAME..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" - inputLog "INIT_PARAMS: $INIT_PARAMS" - inputLog "ENDORSEMENT: $ENDORSEMENT" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n "$COLLECTIONS_CONFIG" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode upgrade \\ - -C "$CHANNEL_NAME" \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -p /var/hyperledger/cli/"$CHAINCODE_NAME"/ \\ - -o "$ORDERER_URL" \\ - -c "$INIT_PARAMS" \\ - -P "$ENDORSEMENT" \\ - "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -peerChannelList() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - - echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list -} - -peerChannelGetInfo() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - - echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ - -c "$CHANNEL_NAME" -} - -peerChannelFetchConfig() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - - echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ - -c "$CHANNEL_NAME" - - docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" configtxlator proto_decode \\ - --input /tmp/hyperledger/assets/config_block_before.pb \\ - --type common.Block | - jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlock() { - local CHANNEL_NAME="$1" - local CLI_NAME="$2" - local BLOCK_NAME="$3" - local PEER_ADDRESS="$4" - local TARGET_FILE="$5" - local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - - echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "BLOCK_NAME: $BLOCK_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "TARGET_FILE: $TARGET_FILE" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ - -c "$CHANNEL_NAME" - - docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ -} - -#=== TLS equivalents ========================================================= - -peerChannelListTls() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CA_CERT=$3 - - echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" -} - -peerChannelGetInfoTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - local CA_CERT=$4 - - echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" -} - -peerChannelFetchConfigTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - local CA_CERT=$5 - - echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - - docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" configtxlator proto_decode \\ - --input /tmp/hyperledger/assets/config_block_before.pb \\ - --type common.Block | - jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlockTls() { - local CHANNEL_NAME="$1" - local CLI_NAME="$2" - local BLOCK_NAME="$3" - local PEER_ADDRESS="$4" - local CA_CERT="$5" - local TARGET_FILE="$6" - local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - - echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "BLOCK_NAME: $BLOCK_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "TARGET_FILE: $TARGET_FILE" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - - docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -createChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - - local ORDERER_URL=$5 - - local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Creating channel with name: \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - - peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx - peer channel join -b "\${CHANNEL_NAME}".block - - rm -rf "$DIR_NAME" -} - -createChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") - local TLS_CA_CERT_PATH=$(realpath "$6") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Creating channel with name (TLS): \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" - echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" - echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" - echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - - peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" - peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - - rm -rf "$DIR_NAME" -} - -fetchChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - - local ORDERER_URL=$5 - - local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Fetching channel with name: \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" - peer channel join -b "\${CHANNEL_NAME}"_newest.block - - rm -rf "$DIR_NAME" -} - -fetchChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") - local TLS_CA_CERT_PATH=$(realpath "$6") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" - echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" - echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" - echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" - peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - - rm -rf "$DIR_NAME" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -__getOrdererAndPeerNodes() { - echo " - orderer0.group1.orderer.example.com - peer0.org1.example.com - peer1.org1.example.com - peer0.org2.example.com - " -} - -__getCASQLiteNodes() { - echo " - ca.orderer.example.com - ca.org1.example.com - ca.org2.example.com - " -} - -__getCAPostgresNodes() { - echo " - " -} - -__createSnapshot() { - cd "$FABLO_NETWORK_ROOT/.." - backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - - if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then - echo "Error: Directory '$backup_dir' already exists and is not empty!" - exit 1 - fi - - mkdir -p "$backup_dir" - cp -R ./fablo-target "$backup_dir/" - - for node in $(__getCASQLiteNodes); do - echo "Saving state of $node..." - mkdir -p "$backup_dir/$node" - docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" - done - - for node in $(__getCAPostgresNodes); do - echo "Saving state of $node..." - mkdir -p "$backup_dir/$node/pg-data" - docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" - done - - for node in $(__getOrdererAndPeerNodes); do - echo "Saving state of $node..." - docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" - done -} - -__cloneSnapshot() { - cd "$FABLO_NETWORK_ROOT/.." - target_dir="$1" - hook_cmd="$2" - - if [ -d "$target_dir/fablo-target" ]; then - echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." - exit 1 - fi - - cp -R ./fablo-target "$target_dir/fablo-target" - - if [ -n "$hook_cmd" ]; then - echo "Executing pre-restore hook: '$hook_cmd'" - (cd "$target_dir" && eval "$hook_cmd") - fi - - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) - - for node in $(__getCASQLiteNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" - fi - done - - for node in $(__getCAPostgresNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" - fi - done - - for node in $(__getOrdererAndPeerNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/" "$node:/var/hyperledger/production/" - fi - done -} - -createSnapshot() { - (set -eu && __createSnapshot "$1") -} - -cloneSnapshot() { - (set -eu && __cloneSnapshot "$1" "$2") -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -# The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo "Executing post-generate hook" -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper files from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -[ - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/.gitignore", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/collections/chaincode1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/configtx.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/.env", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/hooks/post-generate.sh", -] -`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap deleted file mode 100644 index 29b73ff9..00000000 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ /dev/null @@ -1,3083 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"/config -/crypto-config -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"################################################################################ -# SECTION: Capabilities -################################################################################ -Capabilities: - Channel: &ChannelCapabilities - V1_4_3: true - Orderer: &OrdererCapabilities - V1_4_2: true - Application: &ApplicationCapabilities - V1_4_2: true - -################################################################################ -# CHANNEL Defaults -################################################################################ -Channel: &ChannelDefaults - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - Capabilities: - <<: *ChannelCapabilities - -################################################################################ -# Section: Organizations -################################################################################ -Organizations: - - &Orderer - Name: OrdererMSP - ID: OrdererMSP - MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('OrdererMSP.member')" - Writers: - Type: Signature - Rule: "OR('OrdererMSP.member')" - Admins: - Type: Signature - Rule: "OR('OrdererMSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('OrdererMSP.member')" - - AnchorPeers: - - - &Org1 - Name: Org1MSP - ID: Org1MSP - MSPDir: crypto-config/peerOrganizations/org1.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('Org1MSP.member')" - Writers: - Type: Signature - Rule: "OR('Org1MSP.member')" - Admins: - Type: Signature - Rule: "OR('Org1MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('Org1MSP.member')" - - AnchorPeers: - - Host: peer0.org1.example.com - Port: 7041 - - - Host: peer1.org1.example.com - Port: 7042 - -################################################################################ -# SECTION: Application -################################################################################ -Application: &ApplicationDefaults - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Application policies, their canonical path is - # /Channel/Application/ - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - Endorsement: - Type: ImplicitMeta - Rule: "MAJORITY Endorsement" - Capabilities: - <<: *ApplicationCapabilities - -################################################################################ -# SECTION: Orderer -################################################################################ -Orderer: &Group1Defaults - OrdererType: etcdraft - Addresses: - - orderer0.group1.orderer.example.com:7030 - EtcdRaft: - Consenters: - - Host: orderer0.group1.orderer.example.com - Port: 7030 - ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt - ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt - - BatchTimeout: 2s - BatchSize: - MaxMessageCount: 10 - AbsoluteMaxBytes: 99 MB - PreferredMaxBytes: 512 KB - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Orderer policies, their canonical path is - # /Channel/Orderer/ - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - # BlockValidation specifies what signatures must be included in the block - # from the orderer for the peer to validate it. - BlockValidation: - Type: ImplicitMeta - Rule: "ANY Writers" - Capabilities: - <<: *OrdererCapabilities - -################################################################################ -# Profile -################################################################################ -# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml - -Profiles: - # Profile used to create Genesis block for group group1 # - Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - # Profile used to create channeltx for my-channel1 # - MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"{ - "name": "fablo-test-network-orderer", - "description": "Connection profile for Orderer in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Orderer" - }, - "organizations": { - "Orderer": { - "mspid": "OrdererMSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com" - ], - "certificateAuthorities": [ - "ca.orderer.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpcs://localhost:7041", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer0.org1.example.com" - } - }, - "peer1.org1.example.com": { - "url": "grpcs://localhost:7042", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer1.org1.example.com" - } - } - }, - "certificateAuthorities": { - "ca.orderer.example.com": { - "url": "https://localhost:7020", - "caName": "ca.orderer.example.com", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem" - }, - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"name: fablo-test-network-orderer -description: Connection profile for Orderer in Fablo network -version: 1.0.0 -client: - organization: Orderer -organizations: - Orderer: - mspid: OrdererMSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - certificateAuthorities: - - ca.orderer.example.com -peers: - peer0.org1.example.com: - url: grpcs://localhost:7041 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org1.example.com - peer1.org1.example.com: - url: grpcs://localhost:7042 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org1.example.com -certificateAuthorities: - ca.orderer.example.com: - url: https://localhost:7020 - caName: ca.orderer.example.com - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"{ - "name": "fablo-test-network-org1", - "description": "Connection profile for Org1 in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Org1" - }, - "organizations": { - "Org1": { - "mspid": "Org1MSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com" - ], - "certificateAuthorities": [ - "ca.org1.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpcs://localhost:7041", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer0.org1.example.com" - } - }, - "peer1.org1.example.com": { - "url": "grpcs://localhost:7042", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer1.org1.example.com" - } - } - }, - "certificateAuthorities": { - "ca.org1.example.com": { - "url": "https://localhost:7040", - "caName": "ca.org1.example.com", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem" - }, - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"name: fablo-test-network-org1 -description: Connection profile for Org1 in Fablo network -version: 1.0.0 -client: - organization: Org1 -organizations: - Org1: - mspid: Org1MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - certificateAuthorities: - - ca.org1.example.com -peers: - peer0.org1.example.com: - url: grpcs://localhost:7041 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org1.example.com - peer1.org1.example.com: - url: grpcs://localhost:7042 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org1.example.com -certificateAuthorities: - ca.org1.example.com: - url: https://localhost:7040 - caName: ca.org1.example.com - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"PeerOrgs: - - Name: Orderer - Domain: orderer.example.com - Specs: - - Hostname: orderer0.group1 - Template: - Count: 0 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"PeerOrgs: - - Name: Org1 - Domain: org1.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"{ - "network-configs": { - "network-org1": { - "name": "Network of Org1", - "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" - } - }, - "license": "Apache-2.0" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - orderer: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org1: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" - -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/.env" -source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" - -networkUp() { - generateArtifacts - startNetwork - generateChannelsArtifacts - installChannels - installChaincodes - notifyOrgsAboutChannels - printStartSuccessInfo -} - -if [ "$1" = "up" ]; then - networkUp -elif [ "$1" = "down" ]; then - networkDown -elif [ "$1" = "reset" ]; then - networkDown - networkUp -elif [ "$1" = "start" ]; then - startNetwork -elif [ "$1" = "stop" ]; then - stopNetwork -elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then - installChaincodes -elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then - installChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then - upgradeChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then - runDevModeChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then - chaincodeInvoke "$3" "$4" "$5" "$6" "$7" -elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then - chaincodeList "$3" "$4" -elif [ "$1" = "channel" ]; then - channelQuery "\${@:2}" -elif [ "$1" = "snapshot" ]; then - createSnapshot "$2" -elif [ "$1" = "clone-to" ]; then - cloneSnapshot "$2" "\${3:-""}" -elif [ "$1" = "help" ]; then - printHelp -elif [ "$1" = "--help" ]; then - printHelp -else - echo "No command specified" - echo "Basic commands are: up, down, start, stop, reset" - echo "To list channel query helper commands type: 'fablo channel --help'" - echo "Also check: 'chaincode install'" - echo "Use 'help' or '--help' for more information" -fi -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"FABLO_VERSION=1.2.1-unstable.0 -FABLO_BUILD= -FABLO_REST_VERSION=0.1.0 -HYPERLEDGER_EXPLORER_VERSION=1.1.8 - -COUCHDB_VERSION=3.1 -FABRIC_COUCHDB_VERSION=0.4.18 - -FABLO_CONFIG= -CHAINCODES_BASE_DIR= - -COMPOSE_PROJECT_NAME= -LOGGING_LEVEL=debug - -FABRIC_VERSION=1.4.6 -FABRIC_CA_VERSION=1.4.6 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=1.4.6 -FABRIC_BASEOS_VERSION=0.4.9 -FABRIC_JAVAENV_VERSION=1.4 -FABRIC_NODEENV_VERSION=1.4 -RECOMMENDED_NODE_VERSION=12 - -ROOT_CA_ADMIN_NAME=admin -ROOT_CA_ADMIN_PASSWORD=adminpw - -ORDERER_CA_ADMIN_NAME=admin -ORDERER_CA_ADMIN_PASSWORD=adminpw - -ORG1_CA_ADMIN_NAME=admin -ORG1_CA_ADMIN_PASSWORD=adminpw - -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -chaincodeList() { - if [ "$#" -ne 2 ]; then - echo "Expected 2 parameters for chaincode list, but got: $*" - exit 1 - - elif [ "$1" = "peer0.org1.example.com" ]; then - - peerChaincodeListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name - - elif - [ "$1" = "peer1.org1.example.com" ] - then - - peerChaincodeListTls "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name - - else - - echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" - exit 1 - - fi -} - -# Function to perform chaincode invoke. Accepts 5 parameters: -# 1. comma-separated peers -# 2. channel name -# 3. chaincode name -# 4. chaincode command -# 5. transient data (optional) -chaincodeInvoke() { - if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then - echo "Expected 4 or 5 parameters for chaincode list, but got: $*" - echo "Usage: fablo chaincode invoke [transient]" - exit 1 - fi - cli="" - peer_addresses="" - - peer_certs="" - - if [[ "$1" == *"peer0.org1.example.com"* ]]; then - cli="cli.org1.example.com" - peer_addresses="$peer_addresses,peer0.org1.example.com:7041" - - peer_certs="$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt" - - fi - if [[ "$1" == *"peer1.org1.example.com"* ]]; then - cli="cli.org1.example.com" - peer_addresses="$peer_addresses,peer1.org1.example.com:7042" - - peer_certs="$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt" - - fi - if [ -z "$peer_addresses" ]; then - echo "Unknown peers: $1" - exit 1 - fi - - if [ "$2" = "my-channel1" ]; then - ca_cert="crypto-orderer/tlsca.orderer.example.com-cert.pem" - fi - - peerChaincodeInvokeTls "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" "\${peer_certs:1}" "$ca_cert" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" - -set -eu - -channelQuery() { - echo "-> Channel query: " + "$@" - - if [ "$#" -eq 1 ]; then - printChannelsHelp - - elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - - peerChannelListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif - [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] - then - - peerChannelListTls "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif - - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] - then - - peerChannelGetInfoTls "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfigTls "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlockTls "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] - then - - peerChannelGetInfoTls "my-channel1" "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfigTls "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlockTls "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" - - else - - echo "$@" - echo "$1, $2, $3, $4, $5, $6, $7, $#" - printChannelsHelp - fi - -} - -printChannelsHelp() { - echo "Channel management commands:" - echo "" - - echo "fablo channel list org1 peer0" - echo -e "\\t List channels on 'peer0' of 'Org1'". - echo "" - - echo "fablo channel list org1 peer1" - echo -e "\\t List channels on 'peer1' of 'Org1'". - echo "" - - echo "fablo channel getinfo my-channel1 org1 peer0" - echo -e "\\t Get channel info on 'peer0' of 'Org1'". - echo "" - echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". - echo "" - echo "fablo channel fetch my-channel1 org1 peer0 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". - echo "" - - echo "fablo channel getinfo my-channel1 org1 peer1" - echo -e "\\t Get channel info on 'peer1' of 'Org1'". - echo "" - echo "fablo channel fetch config my-channel1 org1 peer1 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". - echo "" - echo "fablo channel fetch my-channel1 org1 peer1 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". - echo "" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -generateArtifacts() { - printHeadline "Generating basic configs" "U1F913" - - printItalics "Generating crypto material for Orderer" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating crypto material for Org1" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating genesis block for group group1" "U1F3E0" - genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" - - # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" -} - -startNetwork() { - printHeadline "Starting network" "U1F680" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) - sleep 4 -} - -generateChannelsArtifacts() { - printHeadline "Generating config for 'my-channel1'" "U1F913" - createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" -} - -installChannels() { - printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" - docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" - - printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" - docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" -} - -installChaincodes() { - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" - else - echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - -} - -installChaincode() { - local chaincodeName="$1" - if [ -z "$chaincodeName" ]; then - echo "Error: chaincode name is not provided" - exit 1 - fi - - local version="$2" - if [ -z "$version" ]; then - echo "Error: chaincode version is not provided" - exit 1 - fi - - if [ "$chaincodeName" = "chaincode1" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" - - else - echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi -} - -runDevModeChaincode() { - echo "Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities" - exit 1 -} - -upgradeChaincode() { - local chaincodeName="$1" - if [ -z "$chaincodeName" ]; then - echo "Error: chaincode name is not provided" - exit 1 - fi - - local version="$2" - if [ -z "$version" ]; then - echo "Error: chaincode version is not provided" - exit 1 - fi - - if [ "$chaincodeName" = "chaincode1" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printItalics "Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'" "U1F618" - chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" - - else - echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi -} - -notifyOrgsAboutChannels() { - printHeadline "Creating new channel config blocks" "U1F537" - createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - - printHeadline "Notyfing orgs about channels" "U1F4E2" - notifyOrgAboutNewChannelTls "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - printHeadline "Deleting new channel config blocks" "U1F52A" - deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" -} - -printStartSuccessInfo() { - printHeadline "Done! Enjoy your fresh network" "U1F984" -} - -stopNetwork() { - printHeadline "Stopping network" "U1F68F" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) - sleep 4 -} - -networkDown() { - printHeadline "Destroying network" "U1F916" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - - printf "Removing chaincode containers & images... \\U1F5D1 \\n" - for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer1.org1.example.com-chaincode1" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer1.org1.example.com-chaincode1*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - - printf "Removing generated configs... \\U1F5D1 \\n" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - - printHeadline "Done! Network was purged" "U1F5D1" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"version: '2.2' - -networks: - basic: - -services: - - ca.orderer.example.com: - container_name: ca.orderer.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - FABRIC_CA_SERVER_TLS_ENABLED=true - ports: - - 7020:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.orderer.example.com: - container_name: cli.orderer.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.orderer.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=OrdererMSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.crt - - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.key - - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/ca.crt - - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - networks: - - basic - - orderer0.group1.orderer.example.com: - container_name: orderer0.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7030 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - # metrics - - ORDERER_OPERATIONS_LISTENADDRESS=orderer0.group1.orderer.example.com:9440 - - ORDERER_METRICS_PROVIDER=prometheus - # enabled TLS - - ORDERER_GENERAL_TLS_ENABLED=true - - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7030:7030 - - 8030:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - ca.org1.example.com: - container_name: ca.org1.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - FABRIC_CA_SERVER_TLS_ENABLED=true - ports: - - 7040:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org1.example.com: - container_name: cli.org1.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org1.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.crt - - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.key - - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/ca.crt - - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - networks: - - basic - - peer0.org1.example.com: - container_name: peer0.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer0.org1.example.com - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8041:9440 - - 7041:7041 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org1.example.com: - container_name: peer1.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer1.org1.example.com - - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8042:9440 - - 7042:7042 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -certsGenerate() { - local CONTAINER_NAME=certsGenerate - - local CONFIG_PATH=$1 - local CRYPTO_CONFIG_FILE_NAME=$2 - local ORG_PATH=$3 - local OUTPUT_PATH=$4 - local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - - echo "Generating certs..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" - inputLog "ORG_PATH: $ORG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - - if [ -d "$FULL_CERT_PATH" ]; then - echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME - - # shellcheck disable=2044 - for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do - dir=$(dirname "$file") - mv "\${dir}"/*_sk "\${dir}"/priv-key.pem - done -} - -genesisBlockCreate() { - local CONTAINER_NAME=genesisBlockCreate - - local CONFIG_PATH=$1 - local OUTPUT_PATH=$2 - local GENESIS_PROFILE_NAME=$3 - local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - - echo "Creating genesis block..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" - inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - - if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then - echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - - mkdir -p "$OUTPUT_PATH" - docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createChannelTx() { - local CONTAINER_NAME=createChannelTx - - local CHANNEL_NAME=$1 - local CONFIG_PATH=$2 - local CONFIG_PROFILE=$3 - local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - - echo "Creating channelTx for $CHANNEL_NAME..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - - if [ -f "$CHANNEL_TX_PATH" ]; then - echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createNewChannelUpdateTx() { - local CONTAINER_NAME=createAnchorPeerUpdateTx - - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CONFIG_PROFILE=$3 - local CONFIG_PATH=$4 - local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then - echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\ - --configPath ./fabric-config \\ - -profile "\${CONFIG_PROFILE}" \\ - -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ - -channelID "\${CHANNEL_NAME}" \\ - -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -notifyOrgAboutNewChannel() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel update \\ - -c "$CHANNEL_NAME" \\ - -o "$ORDERER_URL" \\ - -f "$ANCHOR_PEER_UPDATE_PATH" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -notifyOrgAboutNewChannelTls() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - local CA_CERT="/var/hyperledger/cli/"\${6} - - echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel update \\ - -c "$CHANNEL_NAME" \\ - -o "$ORDERER_URL" \\ - -f "$ANCHOR_PEER_UPDATE_PATH" \\ - --tls --cafile "$CA_CERT" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -deleteNewChannelUpdateTx() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" - inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -printHeadline() { - bold=$'\\e[1m' - end=$'\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" -} - -printItalics() { - italics=$'\\e[3m' - end=$'\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" -} - -inputLog() { - end=$'\\e[0m' - darkGray=$'\\e[90m' - - echo "\${darkGray} $1 \${end}" -} - -inputLogShort() { - end=$'\\e[0m' - darkGray=$'\\e[90m' - - echo "\${darkGray} $1 \${end}" -} - -certsRemove() { - local CERTS_DIR_PATH=$1 - rm -rf "$CERTS_DIR_PATH" -} - -removeContainer() { - CONTAINER_NAME=$1 - docker rm -f "$CONTAINER_NAME" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -printHelp() { - echo "Fablo is powered by SoftwareMill" - - echo "" - echo "usage: ./fabric-docker.sh " - echo "" - - echo "Commands: " - echo "" - echo "./fabric-docker.sh up" - echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." - echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" - echo "" - echo "./fabric-docker.sh down" - echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." - echo "" - echo "./fabric-docker.sh start" - echo -e "\\t Starts already created network." - echo "" - echo "./fabric-docker.sh stop" - echo -e "\\t Stops already running network." - echo "" - echo "./fabric-docker.sh reset" - echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." - echo "" - echo "./fabric-docker.sh channel --help" - echo -e "\\t Detailed help for channel management scripts." - echo "" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash -# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. -# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u - -dockerPullIfMissing() { - local IMAGE="$1" - if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then - docker pull --platform linux/x86_64 "$IMAGE" - fi -} - -chaincodeBuild() { - local CHAINCODE_NAME=$1 - local CHAINCODE_LANG=$2 - local CHAINCODE_DIR_PATH=$3 - local RECOMMENDED_NODE_VERSION=$4 - - mkdir -p "$CHAINCODE_DIR_PATH" - - # pull required images upfront in case of arm64 (Apple Silicon) architecture - # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ "$(uname -m)" = "arm64" ]; then - if [ "$CHAINCODE_LANG" = "node" ]; then - dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" - fi - if [ "$CHAINCODE_LANG" = "java" ]; then - dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" - fi - if [ "$CHAINCODE_LANG" = "golang" ]; then - dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" - fi - fi - - if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" - set +u - nvm install - set -u - cd "$current_dir" - fi - fi - - NODE_VERSION="$(node --version)" - - USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" - if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then - RECOMMENDED_NODE_VERSION="8.9" - fi - - if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then - echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" - echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" - fi - - echo "Buiding chaincode '$CHAINCODE_NAME'..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" - inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - - # We have different commands for npm and yarn - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) - else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) - fi - fi -} - -chaincodeInstall() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local CA_CERT=$8 - - echo "Installing chaincode on $CHANNEL_NAME..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CHANNEL_NAME="$CHANNEL_NAME" "$CLI_NAME" peer chaincode install \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -p "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ - -o "$ORDERER_URL" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} - -chaincodeInstantiate() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo "Instantiating chaincode on $CHANNEL_NAME..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" - inputLog "INIT_PARAMS: $INIT_PARAMS" - inputLog "ENDORSEMENT: $ENDORSEMENT" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n "$COLLECTIONS_CONFIG" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode instantiate \\ - -C "$CHANNEL_NAME" \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -o "$ORDERER_URL" \\ - -c "$INIT_PARAMS" \\ - -P "$ENDORSEMENT" \\ - "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} - -chaincodeUpgrade() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo "Upgrading chaincode on $CHANNEL_NAME..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" - inputLog "INIT_PARAMS: $INIT_PARAMS" - inputLog "ENDORSEMENT: $ENDORSEMENT" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n "$COLLECTIONS_CONFIG" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode upgrade \\ - -C "$CHANNEL_NAME" \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -p /var/hyperledger/cli/"$CHAINCODE_NAME"/ \\ - -o "$ORDERER_URL" \\ - -c "$INIT_PARAMS" \\ - -P "$ENDORSEMENT" \\ - "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -peerChannelList() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - - echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list -} - -peerChannelGetInfo() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - - echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ - -c "$CHANNEL_NAME" -} - -peerChannelFetchConfig() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - - echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ - -c "$CHANNEL_NAME" - - docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" configtxlator proto_decode \\ - --input /tmp/hyperledger/assets/config_block_before.pb \\ - --type common.Block | - jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlock() { - local CHANNEL_NAME="$1" - local CLI_NAME="$2" - local BLOCK_NAME="$3" - local PEER_ADDRESS="$4" - local TARGET_FILE="$5" - local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - - echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "BLOCK_NAME: $BLOCK_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "TARGET_FILE: $TARGET_FILE" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ - -c "$CHANNEL_NAME" - - docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ -} - -#=== TLS equivalents ========================================================= - -peerChannelListTls() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CA_CERT=$3 - - echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" -} - -peerChannelGetInfoTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - local CA_CERT=$4 - - echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" -} - -peerChannelFetchConfigTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - local CA_CERT=$5 - - echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - - docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" configtxlator proto_decode \\ - --input /tmp/hyperledger/assets/config_block_before.pb \\ - --type common.Block | - jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlockTls() { - local CHANNEL_NAME="$1" - local CLI_NAME="$2" - local BLOCK_NAME="$3" - local PEER_ADDRESS="$4" - local CA_CERT="$5" - local TARGET_FILE="$6" - local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - - echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "BLOCK_NAME: $BLOCK_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "TARGET_FILE: $TARGET_FILE" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - - docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -createChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - - local ORDERER_URL=$5 - - local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Creating channel with name: \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - - peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx - peer channel join -b "\${CHANNEL_NAME}".block - - rm -rf "$DIR_NAME" -} - -createChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") - local TLS_CA_CERT_PATH=$(realpath "$6") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Creating channel with name (TLS): \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" - echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" - echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" - echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - - peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" - peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - - rm -rf "$DIR_NAME" -} - -fetchChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - - local ORDERER_URL=$5 - - local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Fetching channel with name: \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" - peer channel join -b "\${CHANNEL_NAME}"_newest.block - - rm -rf "$DIR_NAME" -} - -fetchChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") - local TLS_CA_CERT_PATH=$(realpath "$6") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" - echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" - echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" - echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" - peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - - rm -rf "$DIR_NAME" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -__getOrdererAndPeerNodes() { - echo " - orderer0.group1.orderer.example.com - peer0.org1.example.com - peer1.org1.example.com - " -} - -__getCASQLiteNodes() { - echo " - ca.orderer.example.com - ca.org1.example.com - " -} - -__getCAPostgresNodes() { - echo " - " -} - -__createSnapshot() { - cd "$FABLO_NETWORK_ROOT/.." - backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - - if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then - echo "Error: Directory '$backup_dir' already exists and is not empty!" - exit 1 - fi - - mkdir -p "$backup_dir" - cp -R ./fablo-target "$backup_dir/" - - for node in $(__getCASQLiteNodes); do - echo "Saving state of $node..." - mkdir -p "$backup_dir/$node" - docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" - done - - for node in $(__getCAPostgresNodes); do - echo "Saving state of $node..." - mkdir -p "$backup_dir/$node/pg-data" - docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" - done - - for node in $(__getOrdererAndPeerNodes); do - echo "Saving state of $node..." - docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" - done -} - -__cloneSnapshot() { - cd "$FABLO_NETWORK_ROOT/.." - target_dir="$1" - hook_cmd="$2" - - if [ -d "$target_dir/fablo-target" ]; then - echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." - exit 1 - fi - - cp -R ./fablo-target "$target_dir/fablo-target" - - if [ -n "$hook_cmd" ]; then - echo "Executing pre-restore hook: '$hook_cmd'" - (cd "$target_dir" && eval "$hook_cmd") - fi - - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) - - for node in $(__getCASQLiteNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" - fi - done - - for node in $(__getCAPostgresNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" - fi - done - - for node in $(__getOrdererAndPeerNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/" "$node:/var/hyperledger/production/" - fi - done -} - -createSnapshot() { - (set -eu && __createSnapshot "$1") -} - -cloneSnapshot() { - (set -eu && __cloneSnapshot "$1" "$2") -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -# The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo "Executing post-generate hook" -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper files from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -[ - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/.gitignore", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/.env", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/hooks/post-generate.sh", -] -`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap deleted file mode 100644 index 2c5898bd..00000000 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ /dev/null @@ -1,3900 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"/config -/crypto-config -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"################################################################################ -# SECTION: Capabilities -################################################################################ -Capabilities: - Channel: &ChannelCapabilities - V1_4_3: true - Orderer: &OrdererCapabilities - V1_4_2: true - Application: &ApplicationCapabilities - V1_4_2: true - -################################################################################ -# CHANNEL Defaults -################################################################################ -Channel: &ChannelDefaults - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - Capabilities: - <<: *ChannelCapabilities - -################################################################################ -# Section: Organizations -################################################################################ -Organizations: - - &Orderer - Name: OrdererMSP - ID: OrdererMSP - MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('OrdererMSP.member')" - Writers: - Type: Signature - Rule: "OR('OrdererMSP.member')" - Admins: - Type: Signature - Rule: "OR('OrdererMSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('OrdererMSP.member')" - - AnchorPeers: - - - &Org1 - Name: Org1MSP - ID: Org1MSP - MSPDir: crypto-config/peerOrganizations/org1.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('Org1MSP.member')" - Writers: - Type: Signature - Rule: "OR('Org1MSP.member')" - Admins: - Type: Signature - Rule: "OR('Org1MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('Org1MSP.member')" - - AnchorPeers: - - Host: peer0.org1.example.com - Port: 7041 - - - Host: peer1.org1.example.com - Port: 7042 - - - &Org2 - Name: Org2MSP - ID: Org2MSP - MSPDir: crypto-config/peerOrganizations/org2.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('Org2MSP.member')" - Writers: - Type: Signature - Rule: "OR('Org2MSP.member')" - Admins: - Type: Signature - Rule: "OR('Org2MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('Org2MSP.member')" - - AnchorPeers: - - Host: peer0.org2.example.com - Port: 7061 - - - Host: peer1.org2.example.com - Port: 7062 - -################################################################################ -# SECTION: Application -################################################################################ -Application: &ApplicationDefaults - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Application policies, their canonical path is - # /Channel/Application/ - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - Endorsement: - Type: ImplicitMeta - Rule: "MAJORITY Endorsement" - Capabilities: - <<: *ApplicationCapabilities - -################################################################################ -# SECTION: Orderer -################################################################################ -Orderer: &Group1Defaults - OrdererType: solo - Addresses: - - orderer0.group1.orderer.example.com:7030 - BatchTimeout: 2s - BatchSize: - MaxMessageCount: 10 - AbsoluteMaxBytes: 99 MB - PreferredMaxBytes: 512 KB - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Orderer policies, their canonical path is - # /Channel/Orderer/ - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - # BlockValidation specifies what signatures must be included in the block - # from the orderer for the peer to validate it. - BlockValidation: - Type: ImplicitMeta - Rule: "ANY Writers" - Capabilities: - <<: *OrdererCapabilities - -################################################################################ -# Profile -################################################################################ -# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml - -Profiles: - # Profile used to create Genesis block for group group1 # - Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel1 # - MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel2 # - MyChannel2: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"{ - "name": "fablo-test-network-orderer", - "description": "Connection profile for Orderer in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Orderer" - }, - "organizations": { - "Orderer": { - "mspid": "OrdererMSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com", - "peer1.org2.example.com" - ], - "certificateAuthorities": [ - "ca.orderer.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpc://localhost:7041" - }, - "peer1.org1.example.com": { - "url": "grpc://localhost:7042" - }, - "peer0.org2.example.com": { - "url": "grpc://localhost:7061" - }, - "peer1.org2.example.com": { - "url": "grpc://localhost:7062" - } - }, - "certificateAuthorities": { - "ca.orderer.example.com": { - "url": "http://localhost:7020", - "caName": "ca.orderer.example.com", - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"name: fablo-test-network-orderer -description: Connection profile for Orderer in Fablo network -version: 1.0.0 -client: - organization: Orderer -organizations: - Orderer: - mspid: OrdererMSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.orderer.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 - peer1.org2.example.com: - url: grpc://localhost:7062 -certificateAuthorities: - ca.orderer.example.com: - url: http://localhost:7020 - caName: ca.orderer.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"{ - "name": "fablo-test-network-org1", - "description": "Connection profile for Org1 in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Org1" - }, - "organizations": { - "Org1": { - "mspid": "Org1MSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com", - "peer1.org2.example.com" - ], - "certificateAuthorities": [ - "ca.org1.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpc://localhost:7041" - }, - "peer1.org1.example.com": { - "url": "grpc://localhost:7042" - }, - "peer0.org2.example.com": { - "url": "grpc://localhost:7061" - }, - "peer1.org2.example.com": { - "url": "grpc://localhost:7062" - } - }, - "certificateAuthorities": { - "ca.org1.example.com": { - "url": "http://localhost:7040", - "caName": "ca.org1.example.com", - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"name: fablo-test-network-org1 -description: Connection profile for Org1 in Fablo network -version: 1.0.0 -client: - organization: Org1 -organizations: - Org1: - mspid: Org1MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.org1.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 - peer1.org2.example.com: - url: grpc://localhost:7062 -certificateAuthorities: - ca.org1.example.com: - url: http://localhost:7040 - caName: ca.org1.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"{ - "name": "fablo-test-network-org2", - "description": "Connection profile for Org2 in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Org2" - }, - "organizations": { - "Org2": { - "mspid": "Org2MSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com", - "peer1.org2.example.com" - ], - "certificateAuthorities": [ - "ca.org2.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpc://localhost:7041" - }, - "peer1.org1.example.com": { - "url": "grpc://localhost:7042" - }, - "peer0.org2.example.com": { - "url": "grpc://localhost:7061" - }, - "peer1.org2.example.com": { - "url": "grpc://localhost:7062" - } - }, - "certificateAuthorities": { - "ca.org2.example.com": { - "url": "http://localhost:7060", - "caName": "ca.org2.example.com", - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"name: fablo-test-network-org2 -description: Connection profile for Org2 in Fablo network -version: 1.0.0 -client: - organization: Org2 -organizations: - Org2: - mspid: Org2MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.org2.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 - peer1.org2.example.com: - url: grpc://localhost:7062 -certificateAuthorities: - ca.org2.example.com: - url: http://localhost:7060 - caName: ca.org2.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"PeerOrgs: - - Name: Orderer - Domain: orderer.example.com - Specs: - - Hostname: orderer0.group1 - Template: - Count: 0 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"PeerOrgs: - - Name: Org1 - Domain: org1.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"PeerOrgs: - - Name: Org2 - Domain: org2.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"{ - "network-configs": { - "network-org1": { - "name": "Network of Org1", - "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" - }, - "network-org2": { - "name": "Network of Org2", - "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" - } - }, - "license": "Apache-2.0" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - orderer: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org1: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org2: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" - -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/.env" -source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" - -networkUp() { - generateArtifacts - startNetwork - generateChannelsArtifacts - installChannels - installChaincodes - notifyOrgsAboutChannels - printStartSuccessInfo -} - -if [ "$1" = "up" ]; then - networkUp -elif [ "$1" = "down" ]; then - networkDown -elif [ "$1" = "reset" ]; then - networkDown - networkUp -elif [ "$1" = "start" ]; then - startNetwork -elif [ "$1" = "stop" ]; then - stopNetwork -elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then - installChaincodes -elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then - installChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then - upgradeChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then - runDevModeChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then - chaincodeInvoke "$3" "$4" "$5" "$6" "$7" -elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then - chaincodeList "$3" "$4" -elif [ "$1" = "channel" ]; then - channelQuery "\${@:2}" -elif [ "$1" = "snapshot" ]; then - createSnapshot "$2" -elif [ "$1" = "clone-to" ]; then - cloneSnapshot "$2" "\${3:-""}" -elif [ "$1" = "help" ]; then - printHelp -elif [ "$1" = "--help" ]; then - printHelp -else - echo "No command specified" - echo "Basic commands are: up, down, start, stop, reset" - echo "To list channel query helper commands type: 'fablo channel --help'" - echo "Also check: 'chaincode install'" - echo "Use 'help' or '--help' for more information" -fi -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"FABLO_VERSION=1.2.1-unstable.0 -FABLO_BUILD= -FABLO_REST_VERSION=0.1.0 -HYPERLEDGER_EXPLORER_VERSION=1.1.8 - -COUCHDB_VERSION=3.1 -FABRIC_COUCHDB_VERSION=0.4.18 - -FABLO_CONFIG= -CHAINCODES_BASE_DIR= - -COMPOSE_PROJECT_NAME= -LOGGING_LEVEL=info - -FABRIC_VERSION=1.4.6 -FABRIC_CA_VERSION=1.4.6 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=1.4.6 -FABRIC_BASEOS_VERSION=0.4.9 -FABRIC_JAVAENV_VERSION=1.4 -FABRIC_NODEENV_VERSION=1.4 -RECOMMENDED_NODE_VERSION=12 - -ROOT_CA_ADMIN_NAME=admin -ROOT_CA_ADMIN_PASSWORD=adminpw - -ORDERER_CA_ADMIN_NAME=admin -ORDERER_CA_ADMIN_PASSWORD=adminpw - -ORG1_CA_ADMIN_NAME=admin -ORG1_CA_ADMIN_PASSWORD=adminpw - -ORG2_CA_ADMIN_NAME=admin -ORG2_CA_ADMIN_PASSWORD=adminpw - -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -chaincodeList() { - if [ "$#" -ne 2 ]; then - echo "Expected 2 parameters for chaincode list, but got: $*" - exit 1 - - elif [ "$1" = "peer0.org1.example.com" ]; then - - peerChaincodeList "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" # $2 is channel name - - elif - [ "$1" = "peer1.org1.example.com" ] - then - - peerChaincodeList "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" # $2 is channel name - - elif - [ "$1" = "peer0.org2.example.com" ] - then - - peerChaincodeList "cli.org2.example.com" "peer0.org2.example.com:7061" "$2" # $2 is channel name - - elif - [ "$1" = "peer1.org2.example.com" ] - then - - peerChaincodeList "cli.org2.example.com" "peer1.org2.example.com:7062" "$2" # $2 is channel name - - else - - echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" - exit 1 - - fi -} - -# Function to perform chaincode invoke. Accepts 5 parameters: -# 1. comma-separated peers -# 2. channel name -# 3. chaincode name -# 4. chaincode command -# 5. transient data (optional) -chaincodeInvoke() { - if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then - echo "Expected 4 or 5 parameters for chaincode list, but got: $*" - echo "Usage: fablo chaincode invoke [transient]" - exit 1 - fi - cli="" - peer_addresses="" - - if [[ "$1" == *"peer0.org1.example.com"* ]]; then - cli="cli.org1.example.com" - peer_addresses="$peer_addresses,peer0.org1.example.com:7041" - - fi - if [[ "$1" == *"peer1.org1.example.com"* ]]; then - cli="cli.org1.example.com" - peer_addresses="$peer_addresses,peer1.org1.example.com:7042" - - fi - if [[ "$1" == *"peer0.org2.example.com"* ]]; then - cli="cli.org2.example.com" - peer_addresses="$peer_addresses,peer0.org2.example.com:7061" - - fi - if [[ "$1" == *"peer1.org2.example.com"* ]]; then - cli="cli.org2.example.com" - peer_addresses="$peer_addresses,peer1.org2.example.com:7062" - - fi - if [ -z "$peer_addresses" ]; then - echo "Unknown peers: $1" - exit 1 - fi - - peerChaincodeInvoke "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" - -set -eu - -channelQuery() { - echo "-> Channel query: " + "$@" - - if [ "$#" -eq 1 ]; then - printChannelsHelp - - elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - - peerChannelList "cli.org1.example.com" "peer0.org1.example.com:7041" - - elif - [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] - then - - peerChannelList "cli.org1.example.com" "peer1.org1.example.com:7042" - - elif - [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] - then - - peerChannelList "cli.org2.example.com" "peer0.org2.example.com:7061" - - elif - [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer1" ] - then - - peerChannelList "cli.org2.example.com" "peer1.org2.example.com:7062" - - elif - - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] - then - - peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] - then - - peerChannelGetInfo "my-channel1" "cli.org2.example.com" "peer0.org2.example.com:7061" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfig "my-channel1" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlock "my-channel1" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] - then - - peerChannelGetInfo "my-channel2" "cli.org1.example.com" "peer1.org1.example.com:7042" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfig "my-channel2" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlock "my-channel2" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org2" ] && [ "$4" = "peer1" ] - then - - peerChannelGetInfo "my-channel2" "cli.org2.example.com" "peer1.org2.example.com:7062" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfig "my-channel2" "cli.org2.example.com" "$TARGET_FILE" "peer1.org2.example.com:7062" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlock "my-channel2" "cli.org2.example.com" "\${BLOCK_NAME}" "peer1.org2.example.com:7062" "$TARGET_FILE" - - else - - echo "$@" - echo "$1, $2, $3, $4, $5, $6, $7, $#" - printChannelsHelp - fi - -} - -printChannelsHelp() { - echo "Channel management commands:" - echo "" - - echo "fablo channel list org1 peer0" - echo -e "\\t List channels on 'peer0' of 'Org1'". - echo "" - - echo "fablo channel list org1 peer1" - echo -e "\\t List channels on 'peer1' of 'Org1'". - echo "" - - echo "fablo channel list org2 peer0" - echo -e "\\t List channels on 'peer0' of 'Org2'". - echo "" - - echo "fablo channel list org2 peer1" - echo -e "\\t List channels on 'peer1' of 'Org2'". - echo "" - - echo "fablo channel getinfo my-channel1 org1 peer0" - echo -e "\\t Get channel info on 'peer0' of 'Org1'". - echo "" - echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". - echo "" - echo "fablo channel fetch my-channel1 org1 peer0 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". - echo "" - - echo "fablo channel getinfo my-channel1 org2 peer0" - echo -e "\\t Get channel info on 'peer0' of 'Org2'". - echo "" - echo "fablo channel fetch config my-channel1 org2 peer0 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". - echo "" - echo "fablo channel fetch my-channel1 org2 peer0 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". - echo "" - - echo "fablo channel getinfo my-channel2 org1 peer1" - echo -e "\\t Get channel info on 'peer1' of 'Org1'". - echo "" - echo "fablo channel fetch config my-channel2 org1 peer1 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". - echo "" - echo "fablo channel fetch my-channel2 org1 peer1 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". - echo "" - - echo "fablo channel getinfo my-channel2 org2 peer1" - echo -e "\\t Get channel info on 'peer1' of 'Org2'". - echo "" - echo "fablo channel fetch config my-channel2 org2 peer1 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'". - echo "" - echo "fablo channel fetch my-channel2 org2 peer1 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'". - echo "" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -generateArtifacts() { - printHeadline "Generating basic configs" "U1F913" - - printItalics "Generating crypto material for Orderer" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating crypto material for Org1" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating crypto material for Org2" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating genesis block for group group1" "U1F3E0" - genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" - - # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" -} - -startNetwork() { - printHeadline "Starting network" "U1F680" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) - sleep 4 -} - -generateChannelsArtifacts() { - printHeadline "Generating config for 'my-channel1'" "U1F913" - createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" - printHeadline "Generating config for 'my-channel2'" "U1F913" - createChannelTx "my-channel2" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config/config" -} - -installChannels() { - printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" - docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - - printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" - docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - printHeadline "Creating 'my-channel2' on Org1/peer1" "U1F63B" - docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoin 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - - printItalics "Joining 'my-channel2' on Org2/peer1" "U1F638" - docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" -} - -installChaincodes() { - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member', 'Org2MSP.member')" "" "" - else - echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - -} - -installChaincode() { - local chaincodeName="$1" - if [ -z "$chaincodeName" ]; then - echo "Error: chaincode name is not provided" - exit 1 - fi - - local version="$2" - if [ -z "$version" ]; then - echo "Error: chaincode version is not provided" - exit 1 - fi - - if [ "$chaincodeName" = "chaincode1" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member', 'Org2MSP.member')" "" "" - - else - echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi -} - -runDevModeChaincode() { - echo "Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities" - exit 1 -} - -upgradeChaincode() { - local chaincodeName="$1" - if [ -z "$chaincodeName" ]; then - echo "Error: chaincode name is not provided" - exit 1 - fi - - local version="$2" - if [ -z "$version" ]; then - echo "Error: chaincode version is not provided" - exit 1 - fi - - if [ "$chaincodeName" = "chaincode1" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - - printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'" "U1F618" - chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND ('Org1MSP.member', 'Org2MSP.member')" "" "" - - else - echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi -} - -notifyOrgsAboutChannels() { - printHeadline "Creating new channel config blocks" "U1F537" - createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - createNewChannelUpdateTx "my-channel1" "Org2MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - createNewChannelUpdateTx "my-channel2" "Org1MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - createNewChannelUpdateTx "my-channel2" "Org2MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - - printHeadline "Notyfing orgs about channels" "U1F4E2" - notifyOrgAboutNewChannel "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" - notifyOrgAboutNewChannel "my-channel1" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" - notifyOrgAboutNewChannel "my-channel2" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" - notifyOrgAboutNewChannel "my-channel2" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" - - printHeadline "Deleting new channel config blocks" "U1F52A" - deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" - deleteNewChannelUpdateTx "my-channel1" "Org2MSP" "cli.org2.example.com" - deleteNewChannelUpdateTx "my-channel2" "Org1MSP" "cli.org1.example.com" - deleteNewChannelUpdateTx "my-channel2" "Org2MSP" "cli.org2.example.com" -} - -printStartSuccessInfo() { - printHeadline "Done! Enjoy your fresh network" "U1F984" -} - -stopNetwork() { - printHeadline "Stopping network" "U1F68F" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) - sleep 4 -} - -networkDown() { - printHeadline "Destroying network" "U1F916" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - - printf "Removing chaincode containers & images... \\U1F5D1 \\n" - for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer0.org2.example.com-chaincode1" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org2.example.com-chaincode1*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - - printf "Removing generated configs... \\U1F5D1 \\n" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - - printHeadline "Done! Network was purged" "U1F5D1" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"version: '2.2' - -networks: - basic: - -services: - - ca.orderer.example.com: - container_name: ca.orderer.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7020:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.orderer.example.com: - container_name: cli.orderer.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.orderer.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=OrdererMSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - networks: - - basic - - orderer0.group1.orderer.example.com: - container_name: orderer0.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7030 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7030:7030 - - 8030:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - ca.org1.example.com: - container_name: ca.org1.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7040:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org1.example.com: - container_name: cli.org1.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org1.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - networks: - - basic - - peer0.org1.example.com: - container_name: peer0.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer0.org1.example.com - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8041:9440 - - 7041:7041 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org1.example.com: - container_name: peer1.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer1.org1.example.com - - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8042:9440 - - 7042:7042 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - - ca.org2.example.com: - container_name: ca.org2.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7060:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org2.example.com: - container_name: cli.org2.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org2.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - networks: - - basic - - peer0.org2.example.com: - container_name: peer0.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer0.org2.example.com - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7061 peer1.org2.example.com:7062" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8061:9440 - - 7061:7061 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org2.example.com: - container_name: peer1.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer1.org2.example.com - - CORE_PEER_ADDRESS=peer1.org2.example.com:7062 - - CORE_PEER_LISTENADDRESS=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7061 peer1.org2.example.com:7062" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8062:9440 - - 7062:7062 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -certsGenerate() { - local CONTAINER_NAME=certsGenerate - - local CONFIG_PATH=$1 - local CRYPTO_CONFIG_FILE_NAME=$2 - local ORG_PATH=$3 - local OUTPUT_PATH=$4 - local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - - echo "Generating certs..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" - inputLog "ORG_PATH: $ORG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - - if [ -d "$FULL_CERT_PATH" ]; then - echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME - - # shellcheck disable=2044 - for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do - dir=$(dirname "$file") - mv "\${dir}"/*_sk "\${dir}"/priv-key.pem - done -} - -genesisBlockCreate() { - local CONTAINER_NAME=genesisBlockCreate - - local CONFIG_PATH=$1 - local OUTPUT_PATH=$2 - local GENESIS_PROFILE_NAME=$3 - local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - - echo "Creating genesis block..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" - inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - - if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then - echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - - mkdir -p "$OUTPUT_PATH" - docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createChannelTx() { - local CONTAINER_NAME=createChannelTx - - local CHANNEL_NAME=$1 - local CONFIG_PATH=$2 - local CONFIG_PROFILE=$3 - local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - - echo "Creating channelTx for $CHANNEL_NAME..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - - if [ -f "$CHANNEL_TX_PATH" ]; then - echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createNewChannelUpdateTx() { - local CONTAINER_NAME=createAnchorPeerUpdateTx - - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CONFIG_PROFILE=$3 - local CONFIG_PATH=$4 - local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then - echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\ - --configPath ./fabric-config \\ - -profile "\${CONFIG_PROFILE}" \\ - -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ - -channelID "\${CHANNEL_NAME}" \\ - -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -notifyOrgAboutNewChannel() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel update \\ - -c "$CHANNEL_NAME" \\ - -o "$ORDERER_URL" \\ - -f "$ANCHOR_PEER_UPDATE_PATH" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -notifyOrgAboutNewChannelTls() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - local CA_CERT="/var/hyperledger/cli/"\${6} - - echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel update \\ - -c "$CHANNEL_NAME" \\ - -o "$ORDERER_URL" \\ - -f "$ANCHOR_PEER_UPDATE_PATH" \\ - --tls --cafile "$CA_CERT" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -deleteNewChannelUpdateTx() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" - inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -printHeadline() { - bold=$'\\e[1m' - end=$'\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" -} - -printItalics() { - italics=$'\\e[3m' - end=$'\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" -} - -inputLog() { - end=$'\\e[0m' - darkGray=$'\\e[90m' - - echo "\${darkGray} $1 \${end}" -} - -inputLogShort() { - end=$'\\e[0m' - darkGray=$'\\e[90m' - - echo "\${darkGray} $1 \${end}" -} - -certsRemove() { - local CERTS_DIR_PATH=$1 - rm -rf "$CERTS_DIR_PATH" -} - -removeContainer() { - CONTAINER_NAME=$1 - docker rm -f "$CONTAINER_NAME" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -printHelp() { - echo "Fablo is powered by SoftwareMill" - - echo "" - echo "usage: ./fabric-docker.sh " - echo "" - - echo "Commands: " - echo "" - echo "./fabric-docker.sh up" - echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." - echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" - echo "" - echo "./fabric-docker.sh down" - echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." - echo "" - echo "./fabric-docker.sh start" - echo -e "\\t Starts already created network." - echo "" - echo "./fabric-docker.sh stop" - echo -e "\\t Stops already running network." - echo "" - echo "./fabric-docker.sh reset" - echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." - echo "" - echo "./fabric-docker.sh channel --help" - echo -e "\\t Detailed help for channel management scripts." - echo "" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash -# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. -# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u - -dockerPullIfMissing() { - local IMAGE="$1" - if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then - docker pull --platform linux/x86_64 "$IMAGE" - fi -} - -chaincodeBuild() { - local CHAINCODE_NAME=$1 - local CHAINCODE_LANG=$2 - local CHAINCODE_DIR_PATH=$3 - local RECOMMENDED_NODE_VERSION=$4 - - mkdir -p "$CHAINCODE_DIR_PATH" - - # pull required images upfront in case of arm64 (Apple Silicon) architecture - # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ "$(uname -m)" = "arm64" ]; then - if [ "$CHAINCODE_LANG" = "node" ]; then - dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" - fi - if [ "$CHAINCODE_LANG" = "java" ]; then - dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" - fi - if [ "$CHAINCODE_LANG" = "golang" ]; then - dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" - fi - fi - - if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" - set +u - nvm install - set -u - cd "$current_dir" - fi - fi - - NODE_VERSION="$(node --version)" - - USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" - if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then - RECOMMENDED_NODE_VERSION="8.9" - fi - - if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then - echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" - echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" - fi - - echo "Buiding chaincode '$CHAINCODE_NAME'..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" - inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - - # We have different commands for npm and yarn - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) - else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) - fi - fi -} - -chaincodeInstall() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local CA_CERT=$8 - - echo "Installing chaincode on $CHANNEL_NAME..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CHANNEL_NAME="$CHANNEL_NAME" "$CLI_NAME" peer chaincode install \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -p "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ - -o "$ORDERER_URL" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} - -chaincodeInstantiate() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo "Instantiating chaincode on $CHANNEL_NAME..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" - inputLog "INIT_PARAMS: $INIT_PARAMS" - inputLog "ENDORSEMENT: $ENDORSEMENT" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n "$COLLECTIONS_CONFIG" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode instantiate \\ - -C "$CHANNEL_NAME" \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -o "$ORDERER_URL" \\ - -c "$INIT_PARAMS" \\ - -P "$ENDORSEMENT" \\ - "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} - -chaincodeUpgrade() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo "Upgrading chaincode on $CHANNEL_NAME..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" - inputLog "INIT_PARAMS: $INIT_PARAMS" - inputLog "ENDORSEMENT: $ENDORSEMENT" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n "$COLLECTIONS_CONFIG" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode upgrade \\ - -C "$CHANNEL_NAME" \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -p /var/hyperledger/cli/"$CHAINCODE_NAME"/ \\ - -o "$ORDERER_URL" \\ - -c "$INIT_PARAMS" \\ - -P "$ENDORSEMENT" \\ - "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -peerChannelList() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - - echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list -} - -peerChannelGetInfo() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - - echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ - -c "$CHANNEL_NAME" -} - -peerChannelFetchConfig() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - - echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ - -c "$CHANNEL_NAME" - - docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" configtxlator proto_decode \\ - --input /tmp/hyperledger/assets/config_block_before.pb \\ - --type common.Block | - jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlock() { - local CHANNEL_NAME="$1" - local CLI_NAME="$2" - local BLOCK_NAME="$3" - local PEER_ADDRESS="$4" - local TARGET_FILE="$5" - local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - - echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "BLOCK_NAME: $BLOCK_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "TARGET_FILE: $TARGET_FILE" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ - -c "$CHANNEL_NAME" - - docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ -} - -#=== TLS equivalents ========================================================= - -peerChannelListTls() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CA_CERT=$3 - - echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" -} - -peerChannelGetInfoTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - local CA_CERT=$4 - - echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" -} - -peerChannelFetchConfigTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - local CA_CERT=$5 - - echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - - docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" configtxlator proto_decode \\ - --input /tmp/hyperledger/assets/config_block_before.pb \\ - --type common.Block | - jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlockTls() { - local CHANNEL_NAME="$1" - local CLI_NAME="$2" - local BLOCK_NAME="$3" - local PEER_ADDRESS="$4" - local CA_CERT="$5" - local TARGET_FILE="$6" - local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - - echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "BLOCK_NAME: $BLOCK_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "TARGET_FILE: $TARGET_FILE" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - - docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -createChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - - local ORDERER_URL=$5 - - local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Creating channel with name: \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - - peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx - peer channel join -b "\${CHANNEL_NAME}".block - - rm -rf "$DIR_NAME" -} - -createChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") - local TLS_CA_CERT_PATH=$(realpath "$6") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Creating channel with name (TLS): \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" - echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" - echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" - echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - - peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" - peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - - rm -rf "$DIR_NAME" -} - -fetchChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - - local ORDERER_URL=$5 - - local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Fetching channel with name: \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" - peer channel join -b "\${CHANNEL_NAME}"_newest.block - - rm -rf "$DIR_NAME" -} - -fetchChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") - local TLS_CA_CERT_PATH=$(realpath "$6") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" - echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" - echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" - echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" - peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - - rm -rf "$DIR_NAME" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -__getOrdererAndPeerNodes() { - echo " - orderer0.group1.orderer.example.com - peer0.org1.example.com - peer1.org1.example.com - peer0.org2.example.com - peer1.org2.example.com - " -} - -__getCASQLiteNodes() { - echo " - ca.orderer.example.com - ca.org1.example.com - ca.org2.example.com - " -} - -__getCAPostgresNodes() { - echo " - " -} - -__createSnapshot() { - cd "$FABLO_NETWORK_ROOT/.." - backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - - if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then - echo "Error: Directory '$backup_dir' already exists and is not empty!" - exit 1 - fi - - mkdir -p "$backup_dir" - cp -R ./fablo-target "$backup_dir/" - - for node in $(__getCASQLiteNodes); do - echo "Saving state of $node..." - mkdir -p "$backup_dir/$node" - docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" - done - - for node in $(__getCAPostgresNodes); do - echo "Saving state of $node..." - mkdir -p "$backup_dir/$node/pg-data" - docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" - done - - for node in $(__getOrdererAndPeerNodes); do - echo "Saving state of $node..." - docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" - done -} - -__cloneSnapshot() { - cd "$FABLO_NETWORK_ROOT/.." - target_dir="$1" - hook_cmd="$2" - - if [ -d "$target_dir/fablo-target" ]; then - echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." - exit 1 - fi - - cp -R ./fablo-target "$target_dir/fablo-target" - - if [ -n "$hook_cmd" ]; then - echo "Executing pre-restore hook: '$hook_cmd'" - (cd "$target_dir" && eval "$hook_cmd") - fi - - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) - - for node in $(__getCASQLiteNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" - fi - done - - for node in $(__getCAPostgresNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" - fi - done - - for node in $(__getOrdererAndPeerNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/" "$node:/var/hyperledger/production/" - fi - done -} - -createSnapshot() { - (set -eu && __createSnapshot "$1") -} - -cloneSnapshot() { - (set -eu && __cloneSnapshot "$1" "$2") -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -# The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo "Executing post-generate hook" -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper files from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -[ - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/configtx.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/hooks/post-generate.sh", -] -`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap deleted file mode 100644 index 8f16750c..00000000 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ /dev/null @@ -1,3881 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"/config -/crypto-config -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/and-policy-chaincode.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"[ - { - "name": "org1-collection", - "policy": "OR('Org1MSP.member')", - "requiredPeerCount": 1, - "maxPeerCount": 3, - "blockToLive": 0, - "memberOnlyRead": true - } -]" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/or-policy-chaincode.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"[ - { - "name": "org1-collection", - "policy": "OR('Org1MSP.member')", - "requiredPeerCount": 1, - "maxPeerCount": 3, - "blockToLive": 0, - "memberOnlyRead": true - } -]" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"################################################################################ -# SECTION: Capabilities -################################################################################ -Capabilities: - Channel: &ChannelCapabilities - V1_4_3: true - Orderer: &OrdererCapabilities - V1_4_2: true - Application: &ApplicationCapabilities - V1_4_2: true - -################################################################################ -# CHANNEL Defaults -################################################################################ -Channel: &ChannelDefaults - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - Capabilities: - <<: *ChannelCapabilities - -################################################################################ -# Section: Organizations -################################################################################ -Organizations: - - &Orderer - Name: OrdererMSP - ID: OrdererMSP - MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('OrdererMSP.member')" - Writers: - Type: Signature - Rule: "OR('OrdererMSP.member')" - Admins: - Type: Signature - Rule: "OR('OrdererMSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('OrdererMSP.member')" - - AnchorPeers: - - - &Org1 - Name: Org1MSP - ID: Org1MSP - MSPDir: crypto-config/peerOrganizations/org1.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('Org1MSP.member')" - Writers: - Type: Signature - Rule: "OR('Org1MSP.member')" - Admins: - Type: Signature - Rule: "OR('Org1MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('Org1MSP.member')" - - AnchorPeers: - - Host: peer0.org1.example.com - Port: 7041 - - - Host: peer1.org1.example.com - Port: 7042 - - - &Org2 - Name: Org2MSP - ID: Org2MSP - MSPDir: crypto-config/peerOrganizations/org2.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('Org2MSP.member')" - Writers: - Type: Signature - Rule: "OR('Org2MSP.member')" - Admins: - Type: Signature - Rule: "OR('Org2MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('Org2MSP.member')" - - AnchorPeers: - - Host: peer0.org2.example.com - Port: 7061 - -################################################################################ -# SECTION: Application -################################################################################ -Application: &ApplicationDefaults - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Application policies, their canonical path is - # /Channel/Application/ - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - Endorsement: - Type: ImplicitMeta - Rule: "MAJORITY Endorsement" - Capabilities: - <<: *ApplicationCapabilities - -################################################################################ -# SECTION: Orderer -################################################################################ -Orderer: &Group1Defaults - OrdererType: solo - Addresses: - - orderer0.group1.orderer.example.com:7030 - BatchTimeout: 2s - BatchSize: - MaxMessageCount: 10 - AbsoluteMaxBytes: 99 MB - PreferredMaxBytes: 512 KB - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Orderer policies, their canonical path is - # /Channel/Orderer/ - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - # BlockValidation specifies what signatures must be included in the block - # from the orderer for the peer to validate it. - BlockValidation: - Type: ImplicitMeta - Rule: "ANY Writers" - Capabilities: - <<: *OrdererCapabilities - -################################################################################ -# Profile -################################################################################ -# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml - -Profiles: - # Profile used to create Genesis block for group group1 # - Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel1 # - MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"{ - "name": "fablo-test-network-orderer", - "description": "Connection profile for Orderer in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Orderer" - }, - "organizations": { - "Orderer": { - "mspid": "OrdererMSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com" - ], - "certificateAuthorities": [ - "ca.orderer.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpc://localhost:7041" - }, - "peer1.org1.example.com": { - "url": "grpc://localhost:7042" - }, - "peer0.org2.example.com": { - "url": "grpc://localhost:7061" - } - }, - "certificateAuthorities": { - "ca.orderer.example.com": { - "url": "http://localhost:7020", - "caName": "ca.orderer.example.com", - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"name: fablo-test-network-orderer -description: Connection profile for Orderer in Fablo network -version: 1.0.0 -client: - organization: Orderer -organizations: - Orderer: - mspid: OrdererMSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.orderer.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.orderer.example.com: - url: http://localhost:7020 - caName: ca.orderer.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"{ - "name": "fablo-test-network-org1", - "description": "Connection profile for Org1 in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Org1" - }, - "organizations": { - "Org1": { - "mspid": "Org1MSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com" - ], - "certificateAuthorities": [ - "ca.org1.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpc://localhost:7041" - }, - "peer1.org1.example.com": { - "url": "grpc://localhost:7042" - }, - "peer0.org2.example.com": { - "url": "grpc://localhost:7061" - } - }, - "certificateAuthorities": { - "ca.org1.example.com": { - "url": "http://localhost:7040", - "caName": "ca.org1.example.com", - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"name: fablo-test-network-org1 -description: Connection profile for Org1 in Fablo network -version: 1.0.0 -client: - organization: Org1 -organizations: - Org1: - mspid: Org1MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.org1.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.org1.example.com: - url: http://localhost:7040 - caName: ca.org1.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"{ - "name": "fablo-test-network-org2", - "description": "Connection profile for Org2 in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Org2" - }, - "organizations": { - "Org2": { - "mspid": "Org2MSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com" - ], - "certificateAuthorities": [ - "ca.org2.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpc://localhost:7041" - }, - "peer1.org1.example.com": { - "url": "grpc://localhost:7042" - }, - "peer0.org2.example.com": { - "url": "grpc://localhost:7061" - } - }, - "certificateAuthorities": { - "ca.org2.example.com": { - "url": "http://localhost:7060", - "caName": "ca.org2.example.com", - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"name: fablo-test-network-org2 -description: Connection profile for Org2 in Fablo network -version: 1.0.0 -client: - organization: Org2 -organizations: - Org2: - mspid: Org2MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.org2.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.org2.example.com: - url: http://localhost:7060 - caName: ca.org2.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"PeerOrgs: - - Name: Orderer - Domain: orderer.example.com - Specs: - - Hostname: orderer0.group1 - Template: - Count: 0 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"PeerOrgs: - - Name: Org1 - Domain: org1.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"PeerOrgs: - - Name: Org2 - Domain: org2.example.com - Specs: - Template: - Count: 1 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"{ - "network-configs": { - "network-org1": { - "name": "Network of Org1", - "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" - }, - "network-org2": { - "name": "Network of Org2", - "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" - } - }, - "license": "Apache-2.0" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - orderer: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org1: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org2: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -set -eu - -FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" - -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/.env" -source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" - -networkUp() { - generateArtifacts - startNetwork - generateChannelsArtifacts - installChannels - installChaincodes - notifyOrgsAboutChannels - printStartSuccessInfo -} - -if [ "$1" = "up" ]; then - networkUp -elif [ "$1" = "down" ]; then - networkDown -elif [ "$1" = "reset" ]; then - networkDown - networkUp -elif [ "$1" = "start" ]; then - startNetwork -elif [ "$1" = "stop" ]; then - stopNetwork -elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then - installChaincodes -elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then - installChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then - upgradeChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then - runDevModeChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then - chaincodeInvoke "$3" "$4" "$5" "$6" "$7" -elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then - chaincodeList "$3" "$4" -elif [ "$1" = "channel" ]; then - channelQuery "\${@:2}" -elif [ "$1" = "snapshot" ]; then - createSnapshot "$2" -elif [ "$1" = "clone-to" ]; then - cloneSnapshot "$2" "\${3:-""}" -elif [ "$1" = "help" ]; then - printHelp -elif [ "$1" = "--help" ]; then - printHelp -else - echo "No command specified" - echo "Basic commands are: up, down, start, stop, reset" - echo "To list channel query helper commands type: 'fablo channel --help'" - echo "Also check: 'chaincode install'" - echo "Use 'help' or '--help' for more information" -fi -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"FABLO_VERSION=1.2.1-unstable.0 -FABLO_BUILD= -FABLO_REST_VERSION=0.1.0 -HYPERLEDGER_EXPLORER_VERSION=1.1.8 - -COUCHDB_VERSION=3.1 -FABRIC_COUCHDB_VERSION=0.4.18 - -FABLO_CONFIG= -CHAINCODES_BASE_DIR= - -COMPOSE_PROJECT_NAME= -LOGGING_LEVEL=info - -FABRIC_VERSION=1.4.11 -FABRIC_CA_VERSION=1.5.5 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=1.4.11 -FABRIC_BASEOS_VERSION=0.4.9 -FABRIC_JAVAENV_VERSION=1.4 -FABRIC_NODEENV_VERSION=1.4 -RECOMMENDED_NODE_VERSION=12 - -ROOT_CA_ADMIN_NAME=admin -ROOT_CA_ADMIN_PASSWORD=adminpw - -ORDERER_CA_ADMIN_NAME=admin -ORDERER_CA_ADMIN_PASSWORD=adminpw - -ORG1_CA_ADMIN_NAME=admin -ORG1_CA_ADMIN_PASSWORD=adminpw - -ORG2_CA_ADMIN_NAME=admin -ORG2_CA_ADMIN_PASSWORD=adminpw - -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -chaincodeList() { - if [ "$#" -ne 2 ]; then - echo "Expected 2 parameters for chaincode list, but got: $*" - exit 1 - - elif [ "$1" = "peer0.org1.example.com" ]; then - - peerChaincodeList "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" # $2 is channel name - - elif - [ "$1" = "peer1.org1.example.com" ] - then - - peerChaincodeList "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" # $2 is channel name - - elif - [ "$1" = "peer0.org2.example.com" ] - then - - peerChaincodeList "cli.org2.example.com" "peer0.org2.example.com:7061" "$2" # $2 is channel name - - else - - echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" - exit 1 - - fi -} - -# Function to perform chaincode invoke. Accepts 5 parameters: -# 1. comma-separated peers -# 2. channel name -# 3. chaincode name -# 4. chaincode command -# 5. transient data (optional) -chaincodeInvoke() { - if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then - echo "Expected 4 or 5 parameters for chaincode list, but got: $*" - echo "Usage: fablo chaincode invoke [transient]" - exit 1 - fi - cli="" - peer_addresses="" - - if [[ "$1" == *"peer0.org1.example.com"* ]]; then - cli="cli.org1.example.com" - peer_addresses="$peer_addresses,peer0.org1.example.com:7041" - - fi - if [[ "$1" == *"peer1.org1.example.com"* ]]; then - cli="cli.org1.example.com" - peer_addresses="$peer_addresses,peer1.org1.example.com:7042" - - fi - if [[ "$1" == *"peer0.org2.example.com"* ]]; then - cli="cli.org2.example.com" - peer_addresses="$peer_addresses,peer0.org2.example.com:7061" - - fi - if [ -z "$peer_addresses" ]; then - echo "Unknown peers: $1" - exit 1 - fi - - peerChaincodeInvoke "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" - -set -eu - -channelQuery() { - echo "-> Channel query: " + "$@" - - if [ "$#" -eq 1 ]; then - printChannelsHelp - - elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - - peerChannelList "cli.org1.example.com" "peer0.org1.example.com:7041" - - elif - [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] - then - - peerChannelList "cli.org1.example.com" "peer1.org1.example.com:7042" - - elif - [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] - then - - peerChannelList "cli.org2.example.com" "peer0.org2.example.com:7061" - - elif - - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] - then - - peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] - then - - peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer1.org1.example.com:7042" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] - then - - peerChannelGetInfo "my-channel1" "cli.org2.example.com" "peer0.org2.example.com:7061" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfig "my-channel1" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlock "my-channel1" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "$TARGET_FILE" - - else - - echo "$@" - echo "$1, $2, $3, $4, $5, $6, $7, $#" - printChannelsHelp - fi - -} - -printChannelsHelp() { - echo "Channel management commands:" - echo "" - - echo "fablo channel list org1 peer0" - echo -e "\\t List channels on 'peer0' of 'Org1'". - echo "" - - echo "fablo channel list org1 peer1" - echo -e "\\t List channels on 'peer1' of 'Org1'". - echo "" - - echo "fablo channel list org2 peer0" - echo -e "\\t List channels on 'peer0' of 'Org2'". - echo "" - - echo "fablo channel getinfo my-channel1 org1 peer0" - echo -e "\\t Get channel info on 'peer0' of 'Org1'". - echo "" - echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". - echo "" - echo "fablo channel fetch my-channel1 org1 peer0 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". - echo "" - - echo "fablo channel getinfo my-channel1 org1 peer1" - echo -e "\\t Get channel info on 'peer1' of 'Org1'". - echo "" - echo "fablo channel fetch config my-channel1 org1 peer1 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". - echo "" - echo "fablo channel fetch my-channel1 org1 peer1 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". - echo "" - - echo "fablo channel getinfo my-channel1 org2 peer0" - echo -e "\\t Get channel info on 'peer0' of 'Org2'". - echo "" - echo "fablo channel fetch config my-channel1 org2 peer0 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". - echo "" - echo "fablo channel fetch my-channel1 org2 peer0 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". - echo "" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -generateArtifacts() { - printHeadline "Generating basic configs" "U1F913" - - printItalics "Generating crypto material for Orderer" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating crypto material for Org1" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating crypto material for Org2" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating genesis block for group group1" "U1F3E0" - genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" - - # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" -} - -startNetwork() { - printHeadline "Starting network" "U1F680" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) - sleep 4 -} - -generateChannelsArtifacts() { - printHeadline "Generating config for 'my-channel1'" "U1F913" - createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" -} - -installChannels() { - printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" - docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - - printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" - docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" - printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" - docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" -} - -installChaincodes() { - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "or-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Instantiating chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/or-policy-chaincode.json" - else - echo "Warning! Skipping chaincode 'or-policy-chaincode' installation. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "and-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Instantiating chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND('Org1MSP.member', 'Org2MSP.member')" "" "collections/and-policy-chaincode.json" - else - echo "Warning! Skipping chaincode 'and-policy-chaincode' installation. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - -} - -installChaincode() { - local chaincodeName="$1" - if [ -z "$chaincodeName" ]; then - echo "Error: chaincode name is not provided" - exit 1 - fi - - local version="$2" - if [ -z "$version" ]; then - echo "Error: chaincode version is not provided" - exit 1 - fi - - if [ "$chaincodeName" = "or-policy-chaincode" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "or-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Instantiating chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/or-policy-chaincode.json" - - else - echo "Warning! Skipping chaincode 'or-policy-chaincode' install. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi - if [ "$chaincodeName" = "and-policy-chaincode" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "and-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Instantiating chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND('Org1MSP.member', 'Org2MSP.member')" "" "collections/and-policy-chaincode.json" - - else - echo "Warning! Skipping chaincode 'and-policy-chaincode' install. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi -} - -runDevModeChaincode() { - echo "Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities" - exit 1 -} - -upgradeChaincode() { - local chaincodeName="$1" - if [ -z "$chaincodeName" ]; then - echo "Error: chaincode name is not provided" - exit 1 - fi - - local version="$2" - if [ -z "$version" ]; then - echo "Error: chaincode version is not provided" - exit 1 - fi - - if [ "$chaincodeName" = "or-policy-chaincode" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "or-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - - printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - - printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "or-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - - printHeadline "Installing 'or-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Upgrading as 'Org1'. 'or-policy-chaincode' on channel 'my-channel1'" "U1F618" - chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR('Org1MSP.member', 'Org2MSP.member')" "" "collections/or-policy-chaincode.json" - - else - echo "Warning! Skipping chaincode 'or-policy-chaincode' upgrade. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi - if [ "$chaincodeName" = "and-policy-chaincode" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "and-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - - printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - - printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel1" "and-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - - printHeadline "Installing 'and-policy-chaincode' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" "" - printItalics "Upgrading as 'Org1'. 'and-policy-chaincode' on channel 'my-channel1'" "U1F618" - chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "AND('Org1MSP.member', 'Org2MSP.member')" "" "collections/and-policy-chaincode.json" - - else - echo "Warning! Skipping chaincode 'and-policy-chaincode' upgrade. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi -} - -notifyOrgsAboutChannels() { - printHeadline "Creating new channel config blocks" "U1F537" - createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - createNewChannelUpdateTx "my-channel1" "Org2MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - - printHeadline "Notyfing orgs about channels" "U1F4E2" - notifyOrgAboutNewChannel "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" - notifyOrgAboutNewChannel "my-channel1" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" - - printHeadline "Deleting new channel config blocks" "U1F52A" - deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" - deleteNewChannelUpdateTx "my-channel1" "Org2MSP" "cli.org2.example.com" -} - -printStartSuccessInfo() { - printHeadline "Done! Enjoy your fresh network" "U1F984" -} - -stopNetwork() { - printHeadline "Stopping network" "U1F68F" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) - sleep 4 -} - -networkDown() { - printHeadline "Destroying network" "U1F916" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - - printf "Removing chaincode containers & images... \\U1F5D1 \\n" - for container in $(docker ps -a | grep "dev-peer0.org1.example.com-or-policy-chaincode" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org1.example.com-or-policy-chaincode*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer1.org1.example.com-or-policy-chaincode" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer1.org1.example.com-or-policy-chaincode*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer0.org2.example.com-or-policy-chaincode" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org2.example.com-or-policy-chaincode*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer0.org1.example.com-and-policy-chaincode" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org1.example.com-and-policy-chaincode*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer1.org1.example.com-and-policy-chaincode" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer1.org1.example.com-and-policy-chaincode*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer0.org2.example.com-and-policy-chaincode" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org2.example.com-and-policy-chaincode*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - - printf "Removing generated configs... \\U1F5D1 \\n" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - - printHeadline "Done! Network was purged" "U1F5D1" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"version: '2.2' - -networks: - basic: - -services: - - ca.orderer.example.com: - container_name: ca.orderer.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7020:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.orderer.example.com: - container_name: cli.orderer.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.orderer.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=OrdererMSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/" - - "../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json" - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/" - - "../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json" - networks: - - basic - - orderer0.group1.orderer.example.com: - container_name: orderer0.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7030 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7030:7030 - - 8030:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - ca.org1.example.com: - container_name: ca.org1.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7040:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org1.example.com: - container_name: cli.org1.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org1.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/" - - "../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json" - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/" - - "../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json" - networks: - - basic - - peer0.org1.example.com: - container_name: peer0.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer0.org1.example.com - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8041:9440 - - 7041:7041 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org1.example.com: - container_name: peer1.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer1.org1.example.com - - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8042:9440 - - 7042:7042 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - - ca.org2.example.com: - container_name: ca.org2.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7060:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org2.example.com: - container_name: cli.org2.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org2.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/" - - "../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json" - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/" - - "../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json" - networks: - - basic - - peer0.org2.example.com: - container_name: peer0.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer0.org2.example.com - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7061 - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8061:9440 - - 7061:7061 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -certsGenerate() { - local CONTAINER_NAME=certsGenerate - - local CONFIG_PATH=$1 - local CRYPTO_CONFIG_FILE_NAME=$2 - local ORG_PATH=$3 - local OUTPUT_PATH=$4 - local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - - echo "Generating certs..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" - inputLog "ORG_PATH: $ORG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - - if [ -d "$FULL_CERT_PATH" ]; then - echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME - - # shellcheck disable=2044 - for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do - dir=$(dirname "$file") - mv "\${dir}"/*_sk "\${dir}"/priv-key.pem - done -} - -genesisBlockCreate() { - local CONTAINER_NAME=genesisBlockCreate - - local CONFIG_PATH=$1 - local OUTPUT_PATH=$2 - local GENESIS_PROFILE_NAME=$3 - local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - - echo "Creating genesis block..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" - inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - - if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then - echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - - mkdir -p "$OUTPUT_PATH" - docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createChannelTx() { - local CONTAINER_NAME=createChannelTx - - local CHANNEL_NAME=$1 - local CONFIG_PATH=$2 - local CONFIG_PROFILE=$3 - local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - - echo "Creating channelTx for $CHANNEL_NAME..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - - if [ -f "$CHANNEL_TX_PATH" ]; then - echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createNewChannelUpdateTx() { - local CONTAINER_NAME=createAnchorPeerUpdateTx - - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CONFIG_PROFILE=$3 - local CONFIG_PATH=$4 - local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then - echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\ - --configPath ./fabric-config \\ - -profile "\${CONFIG_PROFILE}" \\ - -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ - -channelID "\${CHANNEL_NAME}" \\ - -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -notifyOrgAboutNewChannel() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel update \\ - -c "$CHANNEL_NAME" \\ - -o "$ORDERER_URL" \\ - -f "$ANCHOR_PEER_UPDATE_PATH" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -notifyOrgAboutNewChannelTls() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - local CA_CERT="/var/hyperledger/cli/"\${6} - - echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel update \\ - -c "$CHANNEL_NAME" \\ - -o "$ORDERER_URL" \\ - -f "$ANCHOR_PEER_UPDATE_PATH" \\ - --tls --cafile "$CA_CERT" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -deleteNewChannelUpdateTx() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" - inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -printHeadline() { - bold=$'\\e[1m' - end=$'\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" -} - -printItalics() { - italics=$'\\e[3m' - end=$'\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" -} - -inputLog() { - end=$'\\e[0m' - darkGray=$'\\e[90m' - - echo "\${darkGray} $1 \${end}" -} - -inputLogShort() { - end=$'\\e[0m' - darkGray=$'\\e[90m' - - echo "\${darkGray} $1 \${end}" -} - -certsRemove() { - local CERTS_DIR_PATH=$1 - rm -rf "$CERTS_DIR_PATH" -} - -removeContainer() { - CONTAINER_NAME=$1 - docker rm -f "$CONTAINER_NAME" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -printHelp() { - echo "Fablo is powered by SoftwareMill" - - echo "" - echo "usage: ./fabric-docker.sh " - echo "" - - echo "Commands: " - echo "" - echo "./fabric-docker.sh up" - echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." - echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" - echo "" - echo "./fabric-docker.sh down" - echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." - echo "" - echo "./fabric-docker.sh start" - echo -e "\\t Starts already created network." - echo "" - echo "./fabric-docker.sh stop" - echo -e "\\t Stops already running network." - echo "" - echo "./fabric-docker.sh reset" - echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." - echo "" - echo "./fabric-docker.sh channel --help" - echo -e "\\t Detailed help for channel management scripts." - echo "" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash -# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. -# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u - -dockerPullIfMissing() { - local IMAGE="$1" - if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then - docker pull --platform linux/x86_64 "$IMAGE" - fi -} - -chaincodeBuild() { - local CHAINCODE_NAME=$1 - local CHAINCODE_LANG=$2 - local CHAINCODE_DIR_PATH=$3 - local RECOMMENDED_NODE_VERSION=$4 - - mkdir -p "$CHAINCODE_DIR_PATH" - - # pull required images upfront in case of arm64 (Apple Silicon) architecture - # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ "$(uname -m)" = "arm64" ]; then - if [ "$CHAINCODE_LANG" = "node" ]; then - dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" - fi - if [ "$CHAINCODE_LANG" = "java" ]; then - dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" - fi - if [ "$CHAINCODE_LANG" = "golang" ]; then - dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" - fi - fi - - if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" - set +u - nvm install - set -u - cd "$current_dir" - fi - fi - - NODE_VERSION="$(node --version)" - - USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" - if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then - RECOMMENDED_NODE_VERSION="8.9" - fi - - if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then - echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" - echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" - fi - - echo "Buiding chaincode '$CHAINCODE_NAME'..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" - inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - - # We have different commands for npm and yarn - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) - else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) - fi - fi -} - -chaincodeInstall() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local CA_CERT=$8 - - echo "Installing chaincode on $CHANNEL_NAME..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CHANNEL_NAME="$CHANNEL_NAME" "$CLI_NAME" peer chaincode install \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -p "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ - -o "$ORDERER_URL" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} - -chaincodeInstantiate() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo "Instantiating chaincode on $CHANNEL_NAME..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" - inputLog "INIT_PARAMS: $INIT_PARAMS" - inputLog "ENDORSEMENT: $ENDORSEMENT" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n "$COLLECTIONS_CONFIG" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode instantiate \\ - -C "$CHANNEL_NAME" \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -o "$ORDERER_URL" \\ - -c "$INIT_PARAMS" \\ - -P "$ENDORSEMENT" \\ - "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} - -chaincodeUpgrade() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo "Upgrading chaincode on $CHANNEL_NAME..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" - inputLog "INIT_PARAMS: $INIT_PARAMS" - inputLog "ENDORSEMENT: $ENDORSEMENT" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n "$COLLECTIONS_CONFIG" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode upgrade \\ - -C "$CHANNEL_NAME" \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -p /var/hyperledger/cli/"$CHAINCODE_NAME"/ \\ - -o "$ORDERER_URL" \\ - -c "$INIT_PARAMS" \\ - -P "$ENDORSEMENT" \\ - "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -peerChannelList() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - - echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list -} - -peerChannelGetInfo() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - - echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ - -c "$CHANNEL_NAME" -} - -peerChannelFetchConfig() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - - echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ - -c "$CHANNEL_NAME" - - docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" configtxlator proto_decode \\ - --input /tmp/hyperledger/assets/config_block_before.pb \\ - --type common.Block | - jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlock() { - local CHANNEL_NAME="$1" - local CLI_NAME="$2" - local BLOCK_NAME="$3" - local PEER_ADDRESS="$4" - local TARGET_FILE="$5" - local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - - echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "BLOCK_NAME: $BLOCK_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "TARGET_FILE: $TARGET_FILE" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ - -c "$CHANNEL_NAME" - - docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ -} - -#=== TLS equivalents ========================================================= - -peerChannelListTls() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CA_CERT=$3 - - echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" -} - -peerChannelGetInfoTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - local CA_CERT=$4 - - echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" -} - -peerChannelFetchConfigTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - local CA_CERT=$5 - - echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - - docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" configtxlator proto_decode \\ - --input /tmp/hyperledger/assets/config_block_before.pb \\ - --type common.Block | - jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlockTls() { - local CHANNEL_NAME="$1" - local CLI_NAME="$2" - local BLOCK_NAME="$3" - local PEER_ADDRESS="$4" - local CA_CERT="$5" - local TARGET_FILE="$6" - local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - - echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "BLOCK_NAME: $BLOCK_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "TARGET_FILE: $TARGET_FILE" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - - docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -set -eu - -createChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - - local ORDERER_URL=$5 - - local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Creating channel with name: \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - - peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx - peer channel join -b "\${CHANNEL_NAME}".block - - rm -rf "$DIR_NAME" -} - -createChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") - local TLS_CA_CERT_PATH=$(realpath "$6") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Creating channel with name (TLS): \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" - echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" - echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" - echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - - peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" - peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - - rm -rf "$DIR_NAME" -} - -fetchChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - - local ORDERER_URL=$5 - - local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Fetching channel with name: \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" - peer channel join -b "\${CHANNEL_NAME}"_newest.block - - rm -rf "$DIR_NAME" -} - -fetchChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") - local TLS_CA_CERT_PATH=$(realpath "$6") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" - echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" - echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" - echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" - peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - - rm -rf "$DIR_NAME" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -__getOrdererAndPeerNodes() { - echo " - orderer0.group1.orderer.example.com - peer0.org1.example.com - peer1.org1.example.com - peer0.org2.example.com - " -} - -__getCASQLiteNodes() { - echo " - ca.orderer.example.com - ca.org1.example.com - ca.org2.example.com - " -} - -__getCAPostgresNodes() { - echo " - " -} - -__createSnapshot() { - cd "$FABLO_NETWORK_ROOT/.." - backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - - if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then - echo "Error: Directory '$backup_dir' already exists and is not empty!" - exit 1 - fi - - mkdir -p "$backup_dir" - cp -R ./fablo-target "$backup_dir/" - - for node in $(__getCASQLiteNodes); do - echo "Saving state of $node..." - mkdir -p "$backup_dir/$node" - docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" - done - - for node in $(__getCAPostgresNodes); do - echo "Saving state of $node..." - mkdir -p "$backup_dir/$node/pg-data" - docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" - done - - for node in $(__getOrdererAndPeerNodes); do - echo "Saving state of $node..." - docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" - done -} - -__cloneSnapshot() { - cd "$FABLO_NETWORK_ROOT/.." - target_dir="$1" - hook_cmd="$2" - - if [ -d "$target_dir/fablo-target" ]; then - echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." - exit 1 - fi - - cp -R ./fablo-target "$target_dir/fablo-target" - - if [ -n "$hook_cmd" ]; then - echo "Executing pre-restore hook: '$hook_cmd'" - (cd "$target_dir" && eval "$hook_cmd") - fi - - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) - - for node in $(__getCASQLiteNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" - fi - done - - for node in $(__getCAPostgresNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" - fi - done - - for node in $(__getOrdererAndPeerNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/" "$node:/var/hyperledger/production/" - fi - done -} - -createSnapshot() { - (set -eu && __createSnapshot "$1") -} - -cloneSnapshot() { - (set -eu && __cloneSnapshot "$1" "$2") -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -# The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo "Executing post-generate hook" -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper files from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -[ - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/.gitignore", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/and-policy-chaincode.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/or-policy-chaincode.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/configtx.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/explorer/config-global.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/commands-generated.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/hooks/post-generate.sh", -] -`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap deleted file mode 100644 index d6c66470..00000000 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ /dev/null @@ -1,4291 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"/config -/crypto-config -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"################################################################################ -# SECTION: Capabilities -################################################################################ -Capabilities: - Channel: &ChannelCapabilities - V1_4_3: true - Orderer: &OrdererCapabilities - V1_4_2: true - Application: &ApplicationCapabilities - V1_4_2: true - -################################################################################ -# CHANNEL Defaults -################################################################################ -Channel: &ChannelDefaults - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - Capabilities: - <<: *ChannelCapabilities - -################################################################################ -# Section: Organizations -################################################################################ -Organizations: - - &Orderer - Name: OrdererMSP - ID: OrdererMSP - MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('OrdererMSP.member')" - Writers: - Type: Signature - Rule: "OR('OrdererMSP.member')" - Admins: - Type: Signature - Rule: "OR('OrdererMSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('OrdererMSP.member')" - - AnchorPeers: - - - &Org1 - Name: Org1MSP - ID: Org1MSP - MSPDir: crypto-config/peerOrganizations/org1.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('Org1MSP.member')" - Writers: - Type: Signature - Rule: "OR('Org1MSP.member')" - Admins: - Type: Signature - Rule: "OR('Org1MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('Org1MSP.member')" - - AnchorPeers: - - Host: peer0.org1.example.com - Port: 7041 - - - Host: peer1.org1.example.com - Port: 7042 - - - &Org2 - Name: Org2MSP - ID: Org2MSP - MSPDir: crypto-config/peerOrganizations/org2.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: "OR('Org2MSP.member')" - Writers: - Type: Signature - Rule: "OR('Org2MSP.member')" - Admins: - Type: Signature - Rule: "OR('Org2MSP.admin')" - Endorsement: - Type: Signature - Rule: "OR('Org2MSP.member')" - - AnchorPeers: - - Host: peer0.org2.example.com - Port: 7061 - - - Host: peer1.org2.example.com - Port: 7062 - -################################################################################ -# SECTION: Application -################################################################################ -Application: &ApplicationDefaults - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Application policies, their canonical path is - # /Channel/Application/ - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - Endorsement: - Type: ImplicitMeta - Rule: "MAJORITY Endorsement" - Capabilities: - <<: *ApplicationCapabilities - -################################################################################ -# SECTION: Orderer -################################################################################ -Orderer: &Group1Defaults - OrdererType: etcdraft - Addresses: - - orderer0.group1.orderer.example.com:7030 - - orderer1.group1.orderer.example.com:7031 - - orderer2.group1.orderer.example.com:7032 - EtcdRaft: - Consenters: - - Host: orderer0.group1.orderer.example.com - Port: 7030 - ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt - ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt - - - Host: orderer1.group1.orderer.example.com - Port: 7031 - ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/tls/server.crt - ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/tls/server.crt - - - Host: orderer2.group1.orderer.example.com - Port: 7032 - ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/tls/server.crt - ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/tls/server.crt - - BatchTimeout: 2s - BatchSize: - MaxMessageCount: 10 - AbsoluteMaxBytes: 99 MB - PreferredMaxBytes: 512 KB - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Orderer policies, their canonical path is - # /Channel/Orderer/ - Policies: - Readers: - Type: ImplicitMeta - Rule: "ANY Readers" - Writers: - Type: ImplicitMeta - Rule: "ANY Writers" - Admins: - Type: ImplicitMeta - Rule: "MAJORITY Admins" - # BlockValidation specifies what signatures must be included in the block - # from the orderer for the peer to validate it. - BlockValidation: - Type: ImplicitMeta - Rule: "ANY Writers" - Capabilities: - <<: *OrdererCapabilities - -################################################################################ -# Profile -################################################################################ -# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml - -Profiles: - # Profile used to create Genesis block for group group1 # - Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel1 # - MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel2 # - MyChannel2: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"{ - "name": "fablo-test-network-orderer", - "description": "Connection profile for Orderer in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Orderer" - }, - "organizations": { - "Orderer": { - "mspid": "OrdererMSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com", - "peer1.org2.example.com" - ], - "certificateAuthorities": [ - "ca.orderer.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpcs://localhost:7041", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer0.org1.example.com" - } - }, - "peer1.org1.example.com": { - "url": "grpcs://localhost:7042", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer1.org1.example.com" - } - }, - "peer0.org2.example.com": { - "url": "grpcs://localhost:7061", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer0.org2.example.com" - } - }, - "peer1.org2.example.com": { - "url": "grpcs://localhost:7062", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer1.org2.example.com" - } - } - }, - "certificateAuthorities": { - "ca.orderer.example.com": { - "url": "https://localhost:7020", - "caName": "ca.orderer.example.com", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem" - }, - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"name: fablo-test-network-orderer -description: Connection profile for Orderer in Fablo network -version: 1.0.0 -client: - organization: Orderer -organizations: - Orderer: - mspid: OrdererMSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.orderer.example.com -peers: - peer0.org1.example.com: - url: grpcs://localhost:7041 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org1.example.com - peer1.org1.example.com: - url: grpcs://localhost:7042 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org1.example.com - peer0.org2.example.com: - url: grpcs://localhost:7061 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org2.example.com - peer1.org2.example.com: - url: grpcs://localhost:7062 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org2.example.com -certificateAuthorities: - ca.orderer.example.com: - url: https://localhost:7020 - caName: ca.orderer.example.com - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"{ - "name": "fablo-test-network-org1", - "description": "Connection profile for Org1 in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Org1" - }, - "organizations": { - "Org1": { - "mspid": "Org1MSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com", - "peer1.org2.example.com" - ], - "certificateAuthorities": [ - "ca.org1.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpcs://localhost:7041", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer0.org1.example.com" - } - }, - "peer1.org1.example.com": { - "url": "grpcs://localhost:7042", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer1.org1.example.com" - } - }, - "peer0.org2.example.com": { - "url": "grpcs://localhost:7061", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer0.org2.example.com" - } - }, - "peer1.org2.example.com": { - "url": "grpcs://localhost:7062", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer1.org2.example.com" - } - } - }, - "certificateAuthorities": { - "ca.org1.example.com": { - "url": "https://localhost:7040", - "caName": "ca.org1.example.com", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem" - }, - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"name: fablo-test-network-org1 -description: Connection profile for Org1 in Fablo network -version: 1.0.0 -client: - organization: Org1 -organizations: - Org1: - mspid: Org1MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.org1.example.com -peers: - peer0.org1.example.com: - url: grpcs://localhost:7041 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org1.example.com - peer1.org1.example.com: - url: grpcs://localhost:7042 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org1.example.com - peer0.org2.example.com: - url: grpcs://localhost:7061 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org2.example.com - peer1.org2.example.com: - url: grpcs://localhost:7062 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org2.example.com -certificateAuthorities: - ca.org1.example.com: - url: https://localhost:7040 - caName: ca.org1.example.com - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"{ - "name": "fablo-test-network-org2", - "description": "Connection profile for Org2 in Fablo network", - "version": "1.0.0", - "client": { - "organization": "Org2" - }, - "organizations": { - "Org2": { - "mspid": "Org2MSP", - "peers": [ - "peer0.org1.example.com", - "peer1.org1.example.com", - "peer0.org2.example.com", - "peer1.org2.example.com" - ], - "certificateAuthorities": [ - "ca.org2.example.com" - ] - } - }, - "peers": { - "peer0.org1.example.com": { - "url": "grpcs://localhost:7041", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer0.org1.example.com" - } - }, - "peer1.org1.example.com": { - "url": "grpcs://localhost:7042", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer1.org1.example.com" - } - }, - "peer0.org2.example.com": { - "url": "grpcs://localhost:7061", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer0.org2.example.com" - } - }, - "peer1.org2.example.com": { - "url": "grpcs://localhost:7062", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" - }, - "grpcOptions": { - "ssl-target-name-override": "peer1.org2.example.com" - } - } - }, - "certificateAuthorities": { - "ca.org2.example.com": { - "url": "https://localhost:7060", - "caName": "ca.org2.example.com", - "tlsCACerts": { - "path": "/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem" - }, - "httpOptions": { - "verify": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"name: fablo-test-network-org2 -description: Connection profile for Org2 in Fablo network -version: 1.0.0 -client: - organization: Org2 -organizations: - Org2: - mspid: Org2MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.org2.example.com -peers: - peer0.org1.example.com: - url: grpcs://localhost:7041 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org1.example.com - peer1.org1.example.com: - url: grpcs://localhost:7042 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org1.example.com - peer0.org2.example.com: - url: grpcs://localhost:7061 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org2.example.com - peer1.org2.example.com: - url: grpcs://localhost:7062 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org2.example.com -certificateAuthorities: - ca.org2.example.com: - url: https://localhost:7060 - caName: ca.org2.example.com - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"PeerOrgs: - - Name: Orderer - Domain: orderer.example.com - Specs: - - Hostname: orderer0.group1 - - Hostname: orderer1.group1 - - Hostname: orderer2.group1 - Template: - Count: 0 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"PeerOrgs: - - Name: Org1 - Domain: org1.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"PeerOrgs: - - Name: Org2 - Domain: org2.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"{ - "network-configs": { - "network-org1": { - "name": "Network of Org1", - "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" - }, - "network-org2": { - "name": "Network of Org2", - "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" - } - }, - "license": "Apache-2.0" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - orderer: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org1: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the "keyfile" element in the "ca" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" -# To set the "keyfile" element in the "ca" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with "file" or "files" are -# name or names of other files. -# For example, see "tls.certfile" and "tls.clientauth.certfiles". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - "*" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if "ldap.enabled" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if "ldap.enabled" in the ldap section below is true, -# which means this "registry" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: "" - attrs: - hf.Registrar.Roles: "*" - hf.Registrar.DelegateRoles: "*" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: "*" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: "sqlite3", "postgres", and "mysql". -# The datasource value depends on the type. -# If the type is "sqlite3", the datasource value is a file name to use -# as the database store. Since "sqlite3" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose "postgres" -# or "mysql". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the "registry" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named "hf.Revoker" with a value of "true" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr("uid") =~ "revoker*" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr("member"),"groups") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # "peer,client,dn3". This is because the value of 'attr("member")' is - # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of - # "group" replaces "dn1" with "peer" and "dn2" with "client". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org2: - -############################################################################# -# Signing section -# -# The "default" subsection is used to sign enrollment certificates; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -# -# The "ca" profile subsection is used to sign intermediate CA certificates; -# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. -# Note that "isca" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The "tls" profile subsection is used to sign TLS certificate requests; -# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# "ca.expiry" field below, whose default value is "131400h" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: "North Carolina" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are "ca1", "ca2", ... "caN", where "N" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the "Multi CA section" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the "intermediate.parentserver.url" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" - -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" -source "$FABLO_NETWORK_ROOT/fabric-docker/.env" -source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" - -networkUp() { - generateArtifacts - startNetwork - generateChannelsArtifacts - installChannels - installChaincodes - notifyOrgsAboutChannels - printStartSuccessInfo -} - -if [ "$1" = "up" ]; then - networkUp -elif [ "$1" = "down" ]; then - networkDown -elif [ "$1" = "reset" ]; then - networkDown - networkUp -elif [ "$1" = "start" ]; then - startNetwork -elif [ "$1" = "stop" ]; then - stopNetwork -elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then - installChaincodes -elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then - installChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then - upgradeChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then - runDevModeChaincode "$3" "$4" -elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then - chaincodeInvoke "$3" "$4" "$5" "$6" "$7" -elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then - chaincodeList "$3" "$4" -elif [ "$1" = "channel" ]; then - channelQuery "\${@:2}" -elif [ "$1" = "snapshot" ]; then - createSnapshot "$2" -elif [ "$1" = "clone-to" ]; then - cloneSnapshot "$2" "\${3:-""}" -elif [ "$1" = "help" ]; then - printHelp -elif [ "$1" = "--help" ]; then - printHelp -else - echo "No command specified" - echo "Basic commands are: up, down, start, stop, reset" - echo "To list channel query helper commands type: 'fablo channel --help'" - echo "Also check: 'chaincode install'" - echo "Use 'help' or '--help' for more information" -fi -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"FABLO_VERSION=1.2.1-unstable.0 -FABLO_BUILD= -FABLO_REST_VERSION=0.1.0 -HYPERLEDGER_EXPLORER_VERSION=1.1.8 - -COUCHDB_VERSION=3.1 -FABRIC_COUCHDB_VERSION=0.4.18 - -FABLO_CONFIG= -CHAINCODES_BASE_DIR= - -COMPOSE_PROJECT_NAME= -LOGGING_LEVEL=info - -FABRIC_VERSION=1.4.6 -FABRIC_CA_VERSION=1.4.6 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=1.4.6 -FABRIC_BASEOS_VERSION=0.4.9 -FABRIC_JAVAENV_VERSION=1.4 -FABRIC_NODEENV_VERSION=1.4 -RECOMMENDED_NODE_VERSION=12 - -ROOT_CA_ADMIN_NAME=admin -ROOT_CA_ADMIN_PASSWORD=adminpw - -ORDERER_CA_ADMIN_NAME=admin -ORDERER_CA_ADMIN_PASSWORD=adminpw - -ORG1_CA_ADMIN_NAME=admin -ORG1_CA_ADMIN_PASSWORD=adminpw - -ORG2_CA_ADMIN_NAME=admin -ORG2_CA_ADMIN_PASSWORD=adminpw - -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -chaincodeList() { - if [ "$#" -ne 2 ]; then - echo "Expected 2 parameters for chaincode list, but got: $*" - exit 1 - - elif [ "$1" = "peer0.org1.example.com" ]; then - - peerChaincodeListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name - - elif - [ "$1" = "peer1.org1.example.com" ] - then - - peerChaincodeListTls "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name - - elif - [ "$1" = "peer0.org2.example.com" ] - then - - peerChaincodeListTls "cli.org2.example.com" "peer0.org2.example.com:7061" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name - - elif - [ "$1" = "peer1.org2.example.com" ] - then - - peerChaincodeListTls "cli.org2.example.com" "peer1.org2.example.com:7062" "$2" "crypto-orderer/tlsca.orderer.example.com-cert.pem" # Third argument is channel name - - else - - echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" - exit 1 - - fi -} - -# Function to perform chaincode invoke. Accepts 5 parameters: -# 1. comma-separated peers -# 2. channel name -# 3. chaincode name -# 4. chaincode command -# 5. transient data (optional) -chaincodeInvoke() { - if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then - echo "Expected 4 or 5 parameters for chaincode list, but got: $*" - echo "Usage: fablo chaincode invoke [transient]" - exit 1 - fi - cli="" - peer_addresses="" - - peer_certs="" - - if [[ "$1" == *"peer0.org1.example.com"* ]]; then - cli="cli.org1.example.com" - peer_addresses="$peer_addresses,peer0.org1.example.com:7041" - - peer_certs="$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt" - - fi - if [[ "$1" == *"peer1.org1.example.com"* ]]; then - cli="cli.org1.example.com" - peer_addresses="$peer_addresses,peer1.org1.example.com:7042" - - peer_certs="$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt" - - fi - if [[ "$1" == *"peer0.org2.example.com"* ]]; then - cli="cli.org2.example.com" - peer_addresses="$peer_addresses,peer0.org2.example.com:7061" - - peer_certs="$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt" - - fi - if [[ "$1" == *"peer1.org2.example.com"* ]]; then - cli="cli.org2.example.com" - peer_addresses="$peer_addresses,peer1.org2.example.com:7062" - - peer_certs="$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt" - - fi - if [ -z "$peer_addresses" ]; then - echo "Unknown peers: $1" - exit 1 - fi - - if [ "$2" = "my-channel1" ]; then - ca_cert="crypto-orderer/tlsca.orderer.example.com-cert.pem" - fi - - if [ "$2" = "my-channel2" ]; then - ca_cert="crypto-orderer/tlsca.orderer.example.com-cert.pem" - fi - - peerChaincodeInvokeTls "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" "\${peer_certs:1}" "$ca_cert" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" - -set -eu - -channelQuery() { - echo "-> Channel query: " + "$@" - - if [ "$#" -eq 1 ]; then - printChannelsHelp - - elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then - - peerChannelListTls "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif - [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] - then - - peerChannelListTls "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif - [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] - then - - peerChannelListTls "cli.org2.example.com" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif - [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer1" ] - then - - peerChannelListTls "cli.org2.example.com" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif - - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] - then - - peerChannelGetInfoTls "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfigTls "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlockTls "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] - then - - peerChannelGetInfoTls "my-channel1" "cli.org2.example.com" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfigTls "my-channel1" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlockTls "my-channel1" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] - then - - peerChannelGetInfoTls "my-channel2" "cli.org1.example.com" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfigTls "my-channel2" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlockTls "my-channel2" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" - - elif - [ "$1" = "getinfo" ] && [ "$2" = "my-channel2" ] && [ "$3" = "org2" ] && [ "$4" = "peer1" ] - then - - peerChannelGetInfoTls "my-channel2" "cli.org2.example.com" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then - TARGET_FILE=\${6:-"$channel-config.json"} - - peerChannelFetchConfigTls "my-channel2" "cli.org2.example.com" "$TARGET_FILE" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - elif [ "$1" = "fetch" ] && [ "$3" = "my-channel2" ] && [ "$4" = "org2" ] && [ "$5" = "peer1" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-"$BLOCK_NAME.block"} - - peerChannelFetchBlockTls "my-channel2" "cli.org2.example.com" "\${BLOCK_NAME}" "peer1.org2.example.com:7062" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "$TARGET_FILE" - - else - - echo "$@" - echo "$1, $2, $3, $4, $5, $6, $7, $#" - printChannelsHelp - fi - -} - -printChannelsHelp() { - echo "Channel management commands:" - echo "" - - echo "fablo channel list org1 peer0" - echo -e "\\t List channels on 'peer0' of 'Org1'". - echo "" - - echo "fablo channel list org1 peer1" - echo -e "\\t List channels on 'peer1' of 'Org1'". - echo "" - - echo "fablo channel list org2 peer0" - echo -e "\\t List channels on 'peer0' of 'Org2'". - echo "" - - echo "fablo channel list org2 peer1" - echo -e "\\t List channels on 'peer1' of 'Org2'". - echo "" - - echo "fablo channel getinfo my-channel1 org1 peer0" - echo -e "\\t Get channel info on 'peer0' of 'Org1'". - echo "" - echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". - echo "" - echo "fablo channel fetch my-channel1 org1 peer0 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". - echo "" - - echo "fablo channel getinfo my-channel1 org2 peer0" - echo -e "\\t Get channel info on 'peer0' of 'Org2'". - echo "" - echo "fablo channel fetch config my-channel1 org2 peer0 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". - echo "" - echo "fablo channel fetch my-channel1 org2 peer0 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". - echo "" - - echo "fablo channel getinfo my-channel2 org1 peer1" - echo -e "\\t Get channel info on 'peer1' of 'Org1'". - echo "" - echo "fablo channel fetch config my-channel2 org1 peer1 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". - echo "" - echo "fablo channel fetch my-channel2 org1 peer1 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". - echo "" - - echo "fablo channel getinfo my-channel2 org2 peer1" - echo -e "\\t Get channel info on 'peer1' of 'Org2'". - echo "" - echo "fablo channel fetch config my-channel2 org2 peer1 [file-name.json]" - echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'". - echo "" - echo "fablo channel fetch my-channel2 org2 peer1 [file name]" - echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'". - echo "" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -generateArtifacts() { - printHeadline "Generating basic configs" "U1F913" - - printItalics "Generating crypto material for Orderer" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating crypto material for Org1" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating crypto material for Org2" "U1F512" - certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" - - printItalics "Generating genesis block for group group1" "U1F3E0" - genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" - - # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" -} - -startNetwork() { - printHeadline "Starting network" "U1F680" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) - sleep 4 -} - -generateChannelsArtifacts() { - printHeadline "Generating config for 'my-channel1'" "U1F913" - createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" - printHeadline "Generating config for 'my-channel2'" "U1F913" - createChannelTx "my-channel2" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config/config" -} - -installChannels() { - printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" - docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" - - printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" - docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" - printHeadline "Creating 'my-channel2' on Org1/peer1" "U1F63B" - docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" - - printItalics "Joining 'my-channel2' on Org2/peer1" "U1F638" - docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" -} - -installChaincodes() { - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" - else - echo "Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple")" ]; then - chaincodeBuild "chaincode2" "java" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple" "12" - printHeadline "Installing 'chaincode2' on my-channel2/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline "Installing 'chaincode2' on my-channel2/Org2/peer1" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer1.org2.example.com:7062" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printItalics "Instantiating chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" - else - echo "Warning! Skipping chaincode 'chaincode2' installation. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'" - fi - -} - -installChaincode() { - local chaincodeName="$1" - if [ -z "$chaincodeName" ]; then - echo "Error: chaincode name is not provided" - exit 1 - fi - - local version="$2" - if [ -z "$version" ]; then - echo "Error: chaincode version is not provided" - exit 1 - fi - - if [ "$chaincodeName" = "chaincode1" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" "12" - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printItalics "Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "0.0.1" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" - - else - echo "Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi - if [ "$chaincodeName" = "chaincode2" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple")" ]; then - chaincodeBuild "chaincode2" "java" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple" "12" - printHeadline "Installing 'chaincode2' on my-channel2/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printHeadline "Installing 'chaincode2' on my-channel2/Org2/peer1" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer1.org2.example.com:7062" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printItalics "Instantiating chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'" "U1F618" - chaincodeInstantiate "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "0.0.1" "java" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" - - else - echo "Warning! Skipping chaincode 'chaincode2' install. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'" - fi - fi -} - -runDevModeChaincode() { - echo "Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities" - exit 1 -} - -upgradeChaincode() { - local chaincodeName="$1" - if [ -z "$chaincodeName" ]; then - echo "Error: chaincode name is not provided" - exit 1 - fi - - local version="$2" - if [ -z "$version" ]; then - echo "Error: chaincode version is not provided" - exit 1 - fi - - if [ "$chaincodeName" = "chaincode1" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4")" ]; then - chaincodeBuild "chaincode1" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4" - - printHeadline "Installing 'chaincode1' on my-channel1/Org1/peer0" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - printHeadline "Installing 'chaincode1' on my-channel1/Org2/peer0" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printItalics "Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'" "U1F618" - chaincodeUpgrade "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "chaincode1" "$version" "node" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" - - else - echo "Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'" - fi - fi - if [ "$chaincodeName" = "chaincode2" ]; then - if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple")" ]; then - chaincodeBuild "chaincode2" "java" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple" - - printHeadline "Installing 'chaincode2' on my-channel2/Org1/peer1" "U1F60E" - chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "$version" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - printHeadline "Installing 'chaincode2' on my-channel2/Org2/peer1" "U1F60E" - chaincodeInstall "cli.org2.example.com" "peer1.org2.example.com:7062" "my-channel2" "chaincode2" "$version" "java" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - printItalics "Upgrading as 'Org1'. 'chaincode2' on channel 'my-channel2'" "U1F618" - chaincodeUpgrade "cli.org1.example.com" "peer1.org1.example.com:7042" "my-channel2" "chaincode2" "$version" "java" "orderer0.group1.orderer.example.com:7030" '{"Args":[]}' "OR ('Org1MSP.member', 'Org2MSP.member')" "crypto-orderer/tlsca.orderer.example.com-cert.pem" "" - - else - echo "Warning! Skipping chaincode 'chaincode2' upgrade. Chaincode directory is empty." - echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'" - fi - fi -} - -notifyOrgsAboutChannels() { - printHeadline "Creating new channel config blocks" "U1F537" - createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - createNewChannelUpdateTx "my-channel1" "Org2MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - createNewChannelUpdateTx "my-channel2" "Org1MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - createNewChannelUpdateTx "my-channel2" "Org2MSP" "MyChannel2" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" - - printHeadline "Notyfing orgs about channels" "U1F4E2" - notifyOrgAboutNewChannelTls "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - notifyOrgAboutNewChannelTls "my-channel1" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - notifyOrgAboutNewChannelTls "my-channel2" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - notifyOrgAboutNewChannelTls "my-channel2" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" "crypto-orderer/tlsca.orderer.example.com-cert.pem" - - printHeadline "Deleting new channel config blocks" "U1F52A" - deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" - deleteNewChannelUpdateTx "my-channel1" "Org2MSP" "cli.org2.example.com" - deleteNewChannelUpdateTx "my-channel2" "Org1MSP" "cli.org1.example.com" - deleteNewChannelUpdateTx "my-channel2" "Org2MSP" "cli.org2.example.com" -} - -printStartSuccessInfo() { - printHeadline "Done! Enjoy your fresh network" "U1F984" -} - -stopNetwork() { - printHeadline "Stopping network" "U1F68F" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) - sleep 4 -} - -networkDown() { - printHeadline "Destroying network" "U1F916" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) - - printf "Removing chaincode containers & images... \\U1F5D1 \\n" - for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org1.example.com-chaincode1*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer0.org2.example.com-chaincode1" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer0.org2.example.com-chaincode1*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer1.org1.example.com-chaincode2" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer1.org1.example.com-chaincode2*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - for container in $(docker ps -a | grep "dev-peer1.org2.example.com-chaincode2" | awk '{print $1}'); do - echo "Removing container $container..." - docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" - done - for image in $(docker images "dev-peer1.org2.example.com-chaincode2*" -q); do - echo "Removing image $image..." - docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" - done - - printf "Removing generated configs... \\U1F5D1 \\n" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" - rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" - - printHeadline "Done! Network was purged" "U1F5D1" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"version: '2.2' - -networks: - basic: - -services: - - ca.orderer.example.com: - container_name: ca.orderer.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - FABRIC_CA_SERVER_TLS_ENABLED=true - ports: - - 7020:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.orderer.example.com: - container_name: cli.orderer.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.orderer.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=OrdererMSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.crt - - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.key - - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/ca.crt - - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/" - networks: - - basic - - orderer0.group1.orderer.example.com: - container_name: orderer0.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7030 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - # metrics - - ORDERER_OPERATIONS_LISTENADDRESS=orderer0.group1.orderer.example.com:9440 - - ORDERER_METRICS_PROVIDER=prometheus - # enabled TLS - - ORDERER_GENERAL_TLS_ENABLED=true - - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7030:7030 - - 8030:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - orderer1.group1.orderer.example.com: - container_name: orderer1.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7031 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - # metrics - - ORDERER_OPERATIONS_LISTENADDRESS=orderer1.group1.orderer.example.com:9440 - - ORDERER_METRICS_PROVIDER=prometheus - # enabled TLS - - ORDERER_GENERAL_TLS_ENABLED=true - - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7031:7031 - - 8031:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - orderer2.group1.orderer.example.com: - container_name: orderer2.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7032 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - # metrics - - ORDERER_OPERATIONS_LISTENADDRESS=orderer2.group1.orderer.example.com:9440 - - ORDERER_METRICS_PROVIDER=prometheus - # enabled TLS - - ORDERER_GENERAL_TLS_ENABLED=true - - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7032:7032 - - 8032:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - ca.org1.example.com: - container_name: ca.org1.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - FABRIC_CA_SERVER_TLS_ENABLED=true - ports: - - 7040:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org1.example.com: - container_name: cli.org1.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org1.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.crt - - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.key - - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/ca.crt - - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/" - networks: - - basic - - peer0.org1.example.com: - container_name: peer0.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer0.org1.example.com - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8041:9440 - - 7041:7041 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org1.example.com: - container_name: peer1.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer1.org1.example.com - - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8042:9440 - - 7042:7042 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - - ca.org2.example.com: - container_name: ca.org2.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - FABRIC_CA_SERVER_TLS_ENABLED=true - ports: - - 7060:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org2.example.com: - container_name: cli.org2.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org2.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/tls/client.crt - - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/tls/client.key - - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/tls/ca.crt - - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/" - - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/" - networks: - - basic - - peer0.org2.example.com: - container_name: peer0.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer0.org2.example.com - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7061 peer1.org2.example.com:7062" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8061:9440 - - 7061:7061 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org2.example.com: - container_name: peer1.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer1.org2.example.com - - CORE_PEER_ADDRESS=peer1.org2.example.com:7062 - - CORE_PEER_LISTENADDRESS=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org2.example.com:7061 peer1.org2.example.com:7062" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8062:9440 - - 7062:7062 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -certsGenerate() { - local CONTAINER_NAME=certsGenerate - - local CONFIG_PATH=$1 - local CRYPTO_CONFIG_FILE_NAME=$2 - local ORG_PATH=$3 - local OUTPUT_PATH=$4 - local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - - echo "Generating certs..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" - inputLog "ORG_PATH: $ORG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" - - if [ -d "$FULL_CERT_PATH" ]; then - echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME - - # shellcheck disable=2044 - for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do - dir=$(dirname "$file") - mv "\${dir}"/*_sk "\${dir}"/priv-key.pem - done -} - -genesisBlockCreate() { - local CONTAINER_NAME=genesisBlockCreate - - local CONFIG_PATH=$1 - local OUTPUT_PATH=$2 - local GENESIS_PROFILE_NAME=$3 - local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - - echo "Creating genesis block..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" - inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" - - if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then - echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME - - mkdir -p "$OUTPUT_PATH" - docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createChannelTx() { - local CONTAINER_NAME=createChannelTx - - local CHANNEL_NAME=$1 - local CONFIG_PATH=$2 - local CONFIG_PROFILE=$3 - local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx - - echo "Creating channelTx for $CHANNEL_NAME..." - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" - - if [ -f "$CHANNEL_TX_PATH" ]; then - echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createNewChannelUpdateTx() { - local CONTAINER_NAME=createAnchorPeerUpdateTx - - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CONFIG_PROFILE=$3 - local CONFIG_PATH=$4 - local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" - inputLog "CONFIG_PATH: $CONFIG_PATH" - inputLog "OUTPUT_PATH: $OUTPUT_PATH" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then - echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" - echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" - exit 1 - fi - - docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME - docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\ - --configPath ./fabric-config \\ - -profile "\${CONFIG_PROFILE}" \\ - -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ - -channelID "\${CHANNEL_NAME}" \\ - -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -notifyOrgAboutNewChannel() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel update \\ - -c "$CHANNEL_NAME" \\ - -o "$ORDERER_URL" \\ - -f "$ANCHOR_PEER_UPDATE_PATH" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -notifyOrgAboutNewChannelTls() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - local CA_CERT="/var/hyperledger/cli/"\${6} - - echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "MSP_NAME: $MSP_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel update \\ - -c "$CHANNEL_NAME" \\ - -o "$ORDERER_URL" \\ - -f "$ANCHOR_PEER_UPDATE_PATH" \\ - --tls --cafile "$CA_CERT" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -deleteNewChannelUpdateTx() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" - - echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" - inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" - - if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then - docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" - else - echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" - fi -} - -printHeadline() { - bold=$'\\e[1m' - end=$'\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" -} - -printItalics() { - italics=$'\\e[3m' - end=$'\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" -} - -inputLog() { - end=$'\\e[0m' - darkGray=$'\\e[90m' - - echo "\${darkGray} $1 \${end}" -} - -inputLogShort() { - end=$'\\e[0m' - darkGray=$'\\e[90m' - - echo "\${darkGray} $1 \${end}" -} - -certsRemove() { - local CERTS_DIR_PATH=$1 - rm -rf "$CERTS_DIR_PATH" -} - -removeContainer() { - CONTAINER_NAME=$1 - docker rm -f "$CONTAINER_NAME" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -printHelp() { - echo "Fablo is powered by SoftwareMill" - - echo "" - echo "usage: ./fabric-docker.sh " - echo "" - - echo "Commands: " - echo "" - echo "./fabric-docker.sh up" - echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." - echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" - echo "" - echo "./fabric-docker.sh down" - echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." - echo "" - echo "./fabric-docker.sh start" - echo -e "\\t Starts already created network." - echo "" - echo "./fabric-docker.sh stop" - echo -e "\\t Stops already running network." - echo "" - echo "./fabric-docker.sh reset" - echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." - echo "" - echo "./fabric-docker.sh channel --help" - echo -e "\\t Detailed help for channel management scripts." - echo "" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash -# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. -# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u - -dockerPullIfMissing() { - local IMAGE="$1" - if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then - docker pull --platform linux/x86_64 "$IMAGE" - fi -} - -chaincodeBuild() { - local CHAINCODE_NAME=$1 - local CHAINCODE_LANG=$2 - local CHAINCODE_DIR_PATH=$3 - local RECOMMENDED_NODE_VERSION=$4 - - mkdir -p "$CHAINCODE_DIR_PATH" - - # pull required images upfront in case of arm64 (Apple Silicon) architecture - # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ "$(uname -m)" = "arm64" ]; then - if [ "$CHAINCODE_LANG" = "node" ]; then - dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" - fi - if [ "$CHAINCODE_LANG" = "java" ]; then - dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" - fi - if [ "$CHAINCODE_LANG" = "golang" ]; then - dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" - fi - fi - - if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" - set +u - nvm install - set -u - cd "$current_dir" - fi - fi - - NODE_VERSION="$(node --version)" - - USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" - if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then - RECOMMENDED_NODE_VERSION="8.9" - fi - - if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then - echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" - echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" - fi - - echo "Buiding chaincode '$CHAINCODE_NAME'..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" - inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - - # We have different commands for npm and yarn - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) - else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) - fi - fi -} - -chaincodeInstall() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local CA_CERT=$8 - - echo "Installing chaincode on $CHANNEL_NAME..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CHANNEL_NAME="$CHANNEL_NAME" "$CLI_NAME" peer chaincode install \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -p "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ - -o "$ORDERER_URL" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} - -chaincodeInstantiate() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo "Instantiating chaincode on $CHANNEL_NAME..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" - inputLog "INIT_PARAMS: $INIT_PARAMS" - inputLog "ENDORSEMENT: $ENDORSEMENT" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n "$COLLECTIONS_CONFIG" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode instantiate \\ - -C "$CHANNEL_NAME" \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -o "$ORDERER_URL" \\ - -c "$INIT_PARAMS" \\ - -P "$ENDORSEMENT" \\ - "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} - -chaincodeUpgrade() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo "Upgrading chaincode on $CHANNEL_NAME..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" - inputLog "INIT_PARAMS: $INIT_PARAMS" - inputLog "ENDORSEMENT: $ENDORSEMENT" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "ORDERER_URL: $ORDERER_URL" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CA_CERT: $CA_CERT" - - local CA_CERT_PARAMS=() - if [ -n "$CA_CERT" ]; then - CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n "$COLLECTIONS_CONFIG" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") - fi - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer chaincode upgrade \\ - -C "$CHANNEL_NAME" \\ - -n "$CHAINCODE_NAME" \\ - -v "$CHAINCODE_VERSION" \\ - -l "$CHAINCODE_LANG" \\ - -p /var/hyperledger/cli/"$CHAINCODE_NAME"/ \\ - -o "$ORDERER_URL" \\ - -c "$INIT_PARAMS" \\ - -P "$ENDORSEMENT" \\ - "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ - "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -peerChannelList() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - - echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list -} - -peerChannelGetInfo() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - - echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ - -c "$CHANNEL_NAME" -} - -peerChannelFetchConfig() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - - echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ - -c "$CHANNEL_NAME" - - docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" configtxlator proto_decode \\ - --input /tmp/hyperledger/assets/config_block_before.pb \\ - --type common.Block | - jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlock() { - local CHANNEL_NAME="$1" - local CLI_NAME="$2" - local BLOCK_NAME="$3" - local PEER_ADDRESS="$4" - local TARGET_FILE="$5" - local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - - echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "BLOCK_NAME: $BLOCK_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "TARGET_FILE: $TARGET_FILE" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ - -c "$CHANNEL_NAME" - - docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ -} - -#=== TLS equivalents ========================================================= - -peerChannelListTls() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CA_CERT=$3 - - echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" -} - -peerChannelGetInfoTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - local CA_CERT=$4 - - echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" -} - -peerChannelFetchConfigTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - local CA_CERT=$5 - - echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - - docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\ - -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" configtxlator proto_decode \\ - --input /tmp/hyperledger/assets/config_block_before.pb \\ - --type common.Block | - jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlockTls() { - local CHANNEL_NAME="$1" - local CLI_NAME="$2" - local BLOCK_NAME="$3" - local PEER_ADDRESS="$4" - local CA_CERT="$5" - local TARGET_FILE="$6" - local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" - - echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." - inputLog "CHANNEL_NAME: $CHANNEL_NAME" - inputLog "CLI_NAME: $CLI_NAME" - inputLog "BLOCK_NAME: $BLOCK_NAME" - inputLog "PEER_ADDRESS: $PEER_ADDRESS" - inputLog "TARGET_FILE: $TARGET_FILE" - - docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ - "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ - -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" - - docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" - - docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -createChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - - local ORDERER_URL=$5 - - local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Creating channel with name: \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - - peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx - peer channel join -b "\${CHANNEL_NAME}".block - - rm -rf "$DIR_NAME" -} - -createChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") - local TLS_CA_CERT_PATH=$(realpath "$6") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Creating channel with name (TLS): \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" - echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" - echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" - echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . - - peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" - peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" - - rm -rf "$DIR_NAME" -} - -fetchChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - - local ORDERER_URL=$5 - - local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Fetching channel with name: \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" - peer channel join -b "\${CHANNEL_NAME}"_newest.block - - rm -rf "$DIR_NAME" -} - -fetchChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") - local TLS_CA_CERT_PATH=$(realpath "$6") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" - echo " Orderer: $ORDERER_URL" - echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" - echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" - echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" - echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" - echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" - echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" - echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" - - mkdir "$DIR_NAME" && cd "$DIR_NAME" - - peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" - peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" - - rm -rf "$DIR_NAME" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -__getOrdererAndPeerNodes() { - echo " - orderer0.group1.orderer.example.com - orderer1.group1.orderer.example.com - orderer2.group1.orderer.example.com - peer0.org1.example.com - peer1.org1.example.com - peer0.org2.example.com - peer1.org2.example.com - " -} - -__getCASQLiteNodes() { - echo " - ca.orderer.example.com - ca.org1.example.com - ca.org2.example.com - " -} - -__getCAPostgresNodes() { - echo " - " -} - -__createSnapshot() { - cd "$FABLO_NETWORK_ROOT/.." - backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" - - if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then - echo "Error: Directory '$backup_dir' already exists and is not empty!" - exit 1 - fi - - mkdir -p "$backup_dir" - cp -R ./fablo-target "$backup_dir/" - - for node in $(__getCASQLiteNodes); do - echo "Saving state of $node..." - mkdir -p "$backup_dir/$node" - docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" - done - - for node in $(__getCAPostgresNodes); do - echo "Saving state of $node..." - mkdir -p "$backup_dir/$node/pg-data" - docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" - done - - for node in $(__getOrdererAndPeerNodes); do - echo "Saving state of $node..." - docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" - done -} - -__cloneSnapshot() { - cd "$FABLO_NETWORK_ROOT/.." - target_dir="$1" - hook_cmd="$2" - - if [ -d "$target_dir/fablo-target" ]; then - echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." - exit 1 - fi - - cp -R ./fablo-target "$target_dir/fablo-target" - - if [ -n "$hook_cmd" ]; then - echo "Executing pre-restore hook: '$hook_cmd'" - (cd "$target_dir" && eval "$hook_cmd") - fi - - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) - - for node in $(__getCASQLiteNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" - fi - done - - for node in $(__getCAPostgresNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" - fi - done - - for node in $(__getOrdererAndPeerNodes); do - echo "Restoring $node..." - if [ ! -d "$node" ]; then - echo "Warning: Cannot restore '$node', directory does not exist!" - else - docker cp "./$node/" "$node:/var/hyperledger/production/" - fi - done -} - -createSnapshot() { - (set -eu && __createSnapshot "$1") -} - -cloneSnapshot() { - (set -eu && __cloneSnapshot "$1" "$2") -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -# The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo "Executing post-generate hook" -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper files from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -[ - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/.gitignore", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/.env", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/hooks/post-generate.sh", -] -`; diff --git a/e2e/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts b/e2e/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts deleted file mode 100644 index 20d0322c..00000000 --- a/e2e/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import performTests from "./performTests"; - -const config = "samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json"; - -describe(config, () => { - performTests(config); -}); diff --git a/e2e/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts b/e2e/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts deleted file mode 100644 index 7920fd14..00000000 --- a/e2e/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import performTests from "./performTests"; - -const config = "samples/fablo-config-hlf1.4-1org-1chaincode-raft.json"; - -describe(config, () => { - performTests(config); -}); diff --git a/e2e/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts b/e2e/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts deleted file mode 100644 index b4b75d63..00000000 --- a/e2e/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import performTests from "./performTests"; - -const config = "samples/fablo-config-hlf1.4-2orgs-1chaincode.json"; - -describe(config, () => { - performTests(config); -}); diff --git a/e2e/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts b/e2e/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts deleted file mode 100644 index 52ca93d3..00000000 --- a/e2e/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import performTests from "./performTests"; - -const config = "samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml"; - -describe(config, () => { - performTests(config); -}); diff --git a/e2e/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts b/e2e/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts deleted file mode 100644 index 1c89d483..00000000 --- a/e2e/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import performTests from "./performTests"; - -const config = "samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json"; - -describe(config, () => { - performTests(config); -}); diff --git a/e2e/fabloCommands.test.ts b/e2e/fabloCommands.test.ts index 0d09db84..b010927c 100644 --- a/e2e/fabloCommands.test.ts +++ b/e2e/fabloCommands.test.ts @@ -84,7 +84,7 @@ describe("validate", () => { it("should validate custom config", () => { // Given - const fabloConfig = `${commands.relativeRoot}/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json`; + const fabloConfig = `${commands.relativeRoot}/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json`; // When const commandResult = commands.fabloExec(`validate ${fabloConfig}`); diff --git a/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json b/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json deleted file mode 100644 index 6e106b6d..00000000 --- a/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", - "global": { - "fabricVersion": "1.3.0", - "tls": false - }, - "orgs": [ - { - "organization": { - "name": "Orderer", - "domain": "orderer.example.com" - }, - "orderers": [ - { - "groupName": "group1", - "prefix": "orderer", - "type": "solo", - "instances": 1 - } - ] - }, - { - "organization": { - "name": "Org1", - "mspName": "Org1MSP", - "domain": "org1.example.com" - }, - "ca": { - "prefix": "ca" - }, - "peer": { - "prefix": "peer", - "instances": 2, - "db": "LevelDb" - } - }, - { - "organization": { - "name": "Org2", - "mspName": "Org2MSP", - "domain": "org2.example.com" - }, - "ca": { - "prefix": "ca" - }, - "peer": { - "prefix": "peer", - "instances": 1, - "db": "LevelDb" - } - } - ], - "channels": [ - { - "name": "my-channel1", - "orgs": [ - { - "name": "Org1", - "peers": [ - "peer0", - "peer1" - ] - }, - { - "name": "Org2", - "peers": [ - "peer0" - ] - } - ] - } - ], - "chaincodes": [ - { - "name": "chaincode1", - "version": "0.0.1", - "lang": "node", - "channel": "my-channel1", - "init": "{\"Args\":[]}", - "endorsement": "OR('Org1MSP.member', 'Org2MSP.member')", - "directory": "./chaincodes/chaincode-kv-node-1.4", - "privateData": [ - { - "name": "org1-collection", - "orgNames": [ - "Org1" - ] - }, - { - "name": "org2-collection", - "orgNames": [ - "Org2" - ] - } - ] - } - ] -} diff --git a/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json b/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json deleted file mode 100644 index bd47697a..00000000 --- a/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", - "global": { - "fabricVersion": "1.4.6", - "tls": true, - "monitoring": { - "loglevel": "debug" - } - }, - "orgs": [ - { - "organization": { - "name": "Orderer", - "domain": "orderer.example.com" - }, - "orderers": [ - { - "groupName": "group1", - "prefix": "orderer", - "type": "raft", - "instances": 1 - } - ] - }, - { - "organization": { - "name": "Org1", - "mspName": "Org1MSP", - "domain": "org1.example.com" - }, - "ca": { - "prefix": "ca" - }, - "peer": { - "prefix": "peer", - "instances": 2, - "db": "LevelDb" - } - } - ], - "channels": [ - { - "name": "my-channel1", - "orgs": [ - { - "name": "Org1", - "peers": [ - "peer0" - ] - }, - { - "name": "Org2", - "peers": [ - "peer0", - "peer1" - ] - } - ] - } - ], - "chaincodes": [ - { - "name": "chaincode1", - "version": "0.0.1", - "lang": "node", - "channel": "my-channel1", - "init": "{\"Args\":[]}", - "endorsement": "AND ('Org1MSP.member')", - "directory": "./chaincodes/chaincode-kv-node-1.4" - } - ] -} diff --git a/samples/fablo-config-hlf1.4-2orgs-1chaincode.json b/samples/fablo-config-hlf1.4-2orgs-1chaincode.json deleted file mode 100644 index cfc4d1d2..00000000 --- a/samples/fablo-config-hlf1.4-2orgs-1chaincode.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", - "global": { - "fabricVersion": "1.4.6", - "tls": false - }, - "orgs": [ - { - "organization": { - "name": "Orderer", - "domain": "orderer.example.com" - }, - "orderers": [ - { - "groupName": "group1", - "prefix": "orderer", - "type": "solo", - "instances": 1 - } - ] - }, - { - "organization": { - "name": "Org1", - "mspName": "Org1MSP", - "domain": "org1.example.com" - }, - "ca": { - "prefix": "ca" - }, - "peer": { - "prefix": "peer", - "instances": 2, - "db": "LevelDb" - } - }, - { - "organization": { - "name": "Org2", - "mspName": "Org2MSP", - "domain": "org2.example.com" - }, - "ca": { - "prefix": "ca" - }, - "peer": { - "prefix": "peer", - "instances": 2, - "db": "LevelDb" - } - } - ], - "channels": [ - { - "name": "my-channel1", - "orgs": [ - { - "name": "Org1", - "peers": [ - "peer0" - ] - }, - { - "name": "Org2", - "peers": [ - "peer0" - ] - } - ] - }, - { - "name": "my-channel2", - "orgs": [ - { - "name": "Org1", - "peers": [ - "peer1" - ] - }, - { - "name": "Org2", - "peers": [ - "peer1" - ] - } - ] - } - ], - "chaincodes": [ - { - "name": "chaincode1", - "version": "0.0.1", - "lang": "node", - "channel": "my-channel1", - "init": "{\"Args\":[]}", - "directory": "./chaincodes/chaincode-kv-node-1.4" - } - ] -} diff --git a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml b/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml deleted file mode 100644 index 844191ba..00000000 --- a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml +++ /dev/null @@ -1,57 +0,0 @@ ---- -"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json -global: - fabricVersion: 1.4.11 - tls: false - -orgs: - - organization: - name: Orderer - domain: orderer.example.com - orderers: - - groupName: group1 - prefix: orderer - type: solo - instances: 1 - - organization: - name: Org1 - domain: org1.example.com - peer: - instances: 2 - - organization: - name: Org2 - domain: org2.example.com - peer: - instances: 1 -channels: - - name: my-channel1 - orgs: - - name: Org1 - peers: - - peer0 - - peer1 - - name: Org2 - peers: - - peer0 -chaincodes: - - name: or-policy-chaincode - version: 0.0.1 - lang: node - channel: my-channel1 - init: '{"Args":[]}' - endorsement: OR('Org1MSP.member', 'Org2MSP.member') - directory: "./chaincodes/chaincode-kv-node-1.4" - privateData: - - name: org1-collection - orgNames: - - Org1 - - name: and-policy-chaincode - version: 0.0.1 - lang: node - channel: my-channel1 - endorsement: AND('Org1MSP.member', 'Org2MSP.member') - directory: "./chaincodes/chaincode-kv-node-1.4" - privateData: - - name: org1-collection - orgNames: - - Org1 diff --git a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json b/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json deleted file mode 100644 index e20d735a..00000000 --- a/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", - "global": { - "fabricVersion": "1.4.6", - "tls": true - }, - "orgs": [ - { - "organization": { - "name": "Orderer", - "domain": "orderer.example.com" - }, - "orderers": [ - { - "groupName": "group1", - "prefix": "orderer", - "type": "raft", - "instances": 3 - } - ] - }, - { - "organization": { - "name": "Org1", - "mspName": "Org1MSP", - "domain": "org1.example.com" - }, - "ca": { - "prefix": "ca" - }, - "peer": { - "prefix": "peer", - "instances": 2, - "anchorPeerInstances": 2, - "db": "LevelDb" - } - }, - { - "organization": { - "name": "Org2", - "mspName": "Org2MSP", - "domain": "org2.example.com" - }, - "ca": { - "prefix": "ca" - }, - "peer": { - "prefix": "peer", - "instances": 2, - "anchorPeerInstances": 2, - "db": "LevelDb" - } - } - ], - "channels": [ - { - "name": "my-channel1", - "orgs": [ - { - "name": "Org1", - "peers": [ - "peer0" - ] - }, - { - "name": "Org2", - "peers": [ - "peer0" - ] - } - ] - }, - { - "name": "my-channel2", - "orgs": [ - { - "name": "Org1", - "peers": [ - "peer1" - ] - }, - { - "name": "Org2", - "peers": [ - "peer1" - ] - } - ] - } - ], - "chaincodes": [ - { - "name": "chaincode1", - "version": "0.0.1", - "lang": "node", - "channel": "my-channel1", - "init": "{\"Args\":[]}", - "endorsement": "OR ('Org1MSP.member', 'Org2MSP.member')", - "directory": "./chaincodes/chaincode-kv-node-1.4" - }, - { - "name": "chaincode2", - "version": "0.0.1", - "lang": "java", - "channel": "my-channel2", - "init": "{\"Args\":[]}", - "endorsement": "OR ('Org1MSP.member', 'Org2MSP.member')", - "directory": "./chaincodes/chaincode-java-simple" - } - ] -} diff --git a/src/validate/index.ts b/src/validate/index.ts index d5a708f6..d25fcf55 100644 --- a/src/validate/index.ts +++ b/src/validate/index.ts @@ -119,6 +119,7 @@ class ValidateGenerator extends Generator { this._validateExplorer(networkConfig.global, networkConfig.orgs); this._validateExplorerWithFabricVersion(networkConfig.global, networkConfig.orgs); this._validateDevMode(networkConfig.global); + this._verifyFabricVersion(networkConfig.global); } async shortSummary() { @@ -464,15 +465,16 @@ class ValidateGenerator extends Generator { } _validateDevMode(global: GlobalJson): void { - if (global.peerDevMode) { - if (global.tls) { + if (global.peerDevMode && global.tls) { const message = `TLS needs to be disabled when running peers in dev mode`; this.emit(validationErrorType.ERROR, { category: validationCategories.GENERAL, message }); - } - if (!version(global.fabricVersion).isGreaterOrEqual("2.0.0")) { - const message = `Fablo supports dev mode only for Fabric in version 2.0.0 and higher`; - this.emit(validationErrorType.ERROR, { category: validationCategories.GENERAL, message }); - } + } + } + + _verifyFabricVersion(global:GlobalJson){ + if (!version(global.fabricVersion).isGreaterOrEqual("2.0.0")) { + const message = `Fablo supports Fabric in version 2.0.0 and higher`; + this.emit(validationErrorType.ERROR, { category: validationCategories.GENERAL, message }); } } } From 068e8b8b3577cb9b8636399cf44bbd6052bf39f3 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Fri, 21 Jun 2024 10:32:57 +0530 Subject: [PATCH 59/83] removed the yarn installation Signed-off-by: Sanket Teli --- .../fabric-docker/scripts/chaincode-functions-v1.4.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh index a809e88e..abe3806a 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh @@ -64,13 +64,16 @@ chaincodeBuild() { inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" + #!/bin/bash - # We have different commands for npm and yarn if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) - else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) + echo "yarn not supported, installing using npm instead" fi + + # Default to using npm for installation and build + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) + + fi } From 68d6204687b6ba794971560cb1f36b8125fe5956 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Fri, 21 Jun 2024 10:47:36 +0530 Subject: [PATCH 60/83] added the snapshots of the changes Signed-off-by: Sanket Teli --- ...-1chaincode-private-data.json.test.ts.snap | 3795 +++++++++++++++ ...1.4-1org-1chaincode-raft.json.test.ts.snap | 3086 ++++++++++++ ...-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 3903 +++++++++++++++ ...2chaincodes-private-data.yaml.test.ts.snap | 3884 +++++++++++++++ ...4-2orgs-2chaincodes-raft.json.test.ts.snap | 4294 +++++++++++++++++ 5 files changed, 18962 insertions(+) create mode 100644 e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap create mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap create mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap create mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap create mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap new file mode 100644 index 00000000..333fe5c1 --- /dev/null +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -0,0 +1,3795 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"/config +/crypto-config +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/collections/chaincode1.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"[ + { + \\"name\\": \\"org1-collection\\", + \\"policy\\": \\"OR('Org1MSP.member')\\", + \\"requiredPeerCount\\": 1, + \\"maxPeerCount\\": 3, + \\"blockToLive\\": 0 + }, + { + \\"name\\": \\"org2-collection\\", + \\"policy\\": \\"OR('Org2MSP.member')\\", + \\"requiredPeerCount\\": 1, + \\"maxPeerCount\\": 3, + \\"blockToLive\\": 0 + } +]" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"################################################################################ +# SECTION: Capabilities +################################################################################ +Capabilities: + Channel: &ChannelCapabilities + V1_3: true + Orderer: &OrdererCapabilities + V1_1: true + Application: &ApplicationCapabilities + V1_3: true + +################################################################################ +# CHANNEL Defaults +################################################################################ +Channel: &ChannelDefaults + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + Capabilities: + <<: *ChannelCapabilities + +################################################################################ +# Section: Organizations +################################################################################ +Organizations: + - &Orderer + Name: OrdererMSP + ID: OrdererMSP + MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('OrdererMSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + + AnchorPeers: + + - &Org1 + Name: Org1MSP + ID: Org1MSP + MSPDir: crypto-config/peerOrganizations/org1.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('Org1MSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + + AnchorPeers: + - Host: peer0.org1.example.com + Port: 7041 + + - Host: peer1.org1.example.com + Port: 7042 + + - &Org2 + Name: Org2MSP + ID: Org2MSP + MSPDir: crypto-config/peerOrganizations/org2.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('Org2MSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + + AnchorPeers: + - Host: peer0.org2.example.com + Port: 7061 + +################################################################################ +# SECTION: Application +################################################################################ +Application: &ApplicationDefaults + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Application policies, their canonical path is + # /Channel/Application/ + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + Endorsement: + Type: ImplicitMeta + Rule: \\"MAJORITY Endorsement\\" + Capabilities: + <<: *ApplicationCapabilities + +################################################################################ +# SECTION: Orderer +################################################################################ +Orderer: &Group1Defaults + OrdererType: solo + Addresses: + - orderer0.group1.orderer.example.com:7030 + BatchTimeout: 2s + BatchSize: + MaxMessageCount: 10 + AbsoluteMaxBytes: 99 MB + PreferredMaxBytes: 512 KB + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Orderer policies, their canonical path is + # /Channel/Orderer/ + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + # BlockValidation specifies what signatures must be included in the block + # from the orderer for the peer to validate it. + BlockValidation: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Capabilities: + <<: *OrdererCapabilities + +################################################################################ +# Profile +################################################################################ +# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml + +Profiles: + # Profile used to create Genesis block for group group1 # + Group1Genesis: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 + + # Profile used to create channeltx for my-channel1 # + MyChannel1: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-orderer\\", + \\"description\\": \\"Connection profile for Orderer in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Orderer\\" + }, + \\"organizations\\": { + \\"Orderer\\": { + \\"mspid\\": \\"OrdererMSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.orderer.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7041\\" + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7042\\" + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7061\\" + } + }, + \\"certificateAuthorities\\": { + \\"ca.orderer.example.com\\": { + \\"url\\": \\"http://localhost:7020\\", + \\"caName\\": \\"ca.orderer.example.com\\", + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"name: fablo-test-network-orderer +description: Connection profile for Orderer in Fablo network +version: 1.0.0 +client: + organization: Orderer +organizations: + Orderer: + mspid: OrdererMSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + certificateAuthorities: + - ca.orderer.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 +certificateAuthorities: + ca.orderer.example.com: + url: http://localhost:7020 + caName: ca.orderer.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-org1\\", + \\"description\\": \\"Connection profile for Org1 in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Org1\\" + }, + \\"organizations\\": { + \\"Org1\\": { + \\"mspid\\": \\"Org1MSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.org1.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7041\\" + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7042\\" + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7061\\" + } + }, + \\"certificateAuthorities\\": { + \\"ca.org1.example.com\\": { + \\"url\\": \\"http://localhost:7040\\", + \\"caName\\": \\"ca.org1.example.com\\", + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"name: fablo-test-network-org1 +description: Connection profile for Org1 in Fablo network +version: 1.0.0 +client: + organization: Org1 +organizations: + Org1: + mspid: Org1MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + certificateAuthorities: + - ca.org1.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 +certificateAuthorities: + ca.org1.example.com: + url: http://localhost:7040 + caName: ca.org1.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-org2\\", + \\"description\\": \\"Connection profile for Org2 in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Org2\\" + }, + \\"organizations\\": { + \\"Org2\\": { + \\"mspid\\": \\"Org2MSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.org2.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7041\\" + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7042\\" + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7061\\" + } + }, + \\"certificateAuthorities\\": { + \\"ca.org2.example.com\\": { + \\"url\\": \\"http://localhost:7060\\", + \\"caName\\": \\"ca.org2.example.com\\", + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"name: fablo-test-network-org2 +description: Connection profile for Org2 in Fablo network +version: 1.0.0 +client: + organization: Org2 +organizations: + Org2: + mspid: Org2MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + certificateAuthorities: + - ca.org2.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 +certificateAuthorities: + ca.org2.example.com: + url: http://localhost:7060 + caName: ca.org2.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"PeerOrgs: + - Name: Orderer + Domain: orderer.example.com + Specs: + - Hostname: orderer0.group1 + Template: + Count: 0 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"PeerOrgs: + - Name: Org1 + Domain: org1.example.com + Specs: + Template: + Count: 2 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"PeerOrgs: + - Name: Org2 + Domain: org2.example.com + Specs: + Template: + Count: 1 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"{ + \\"network-configs\\": { + \\"network-org1\\": { + \\"name\\": \\"Network of Org1\\", + \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + }, + \\"network-org2\\": { + \\"name\\": \\"Network of Org2\\", + \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + } + }, + \\"license\\": \\"Apache-2.0\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + orderer: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org1: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org2: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash + +set -eu + +FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" + +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" + +networkUp() { + generateArtifacts + startNetwork + generateChannelsArtifacts + installChannels + installChaincodes + notifyOrgsAboutChannels + printStartSuccessInfo +} + +if [ \\"$1\\" = \\"up\\" ]; then + networkUp +elif [ \\"$1\\" = \\"down\\" ]; then + networkDown +elif [ \\"$1\\" = \\"reset\\" ]; then + networkDown + networkUp +elif [ \\"$1\\" = \\"start\\" ]; then + startNetwork +elif [ \\"$1\\" = \\"stop\\" ]; then + stopNetwork +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then + installChaincodes +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then + installChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then + upgradeChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then + runDevModeChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then + chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"channel\\" ]; then + channelQuery \\"\${@:2}\\" +elif [ \\"$1\\" = \\"snapshot\\" ]; then + createSnapshot \\"$2\\" +elif [ \\"$1\\" = \\"clone-to\\" ]; then + cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" +elif [ \\"$1\\" = \\"help\\" ]; then + printHelp +elif [ \\"$1\\" = \\"--help\\" ]; then + printHelp +else + echo \\"No command specified\\" + echo \\"Basic commands are: up, down, start, stop, reset\\" + echo \\"To list channel query helper commands type: 'fablo channel --help'\\" + echo \\"Also check: 'chaincode install'\\" + echo \\"Use 'help' or '--help' for more information\\" +fi +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"FABLO_VERSION=1.2.1-unstable.0 +FABLO_BUILD= +FABLO_REST_VERSION=0.1.0 +HYPERLEDGER_EXPLORER_VERSION=1.1.8 + +COUCHDB_VERSION=3.1 +FABRIC_COUCHDB_VERSION=0.4.18 + +FABLO_CONFIG= +CHAINCODES_BASE_DIR= + +COMPOSE_PROJECT_NAME= +LOGGING_LEVEL=info + +FABRIC_VERSION=1.3.0 +FABRIC_CA_VERSION=1.3.0 +FABRIC_CA_POSTGRES_VERSION=14 +FABRIC_CCENV_VERSION=1.3.0 +FABRIC_BASEOS_VERSION=0.4.9 +FABRIC_JAVAENV_VERSION=1.3 +FABRIC_NODEENV_VERSION=1.3 +RECOMMENDED_NODE_VERSION=12 + +ROOT_CA_ADMIN_NAME=admin +ROOT_CA_ADMIN_PASSWORD=adminpw + +ORDERER_CA_ADMIN_NAME=admin +ORDERER_CA_ADMIN_PASSWORD=adminpw + +ORG1_CA_ADMIN_NAME=admin +ORG1_CA_ADMIN_PASSWORD=adminpw + +ORG2_CA_ADMIN_NAME=admin +ORG2_CA_ADMIN_PASSWORD=adminpw + +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash + +chaincodeList() { + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + then + + peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash + +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" + +set -eu + +channelQuery() { + echo \\"-> Channel query: \\" + \\"$@\\" + + if [ \\"$#\\" -eq 1 ]; then + printChannelsHelp + + elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + + peerChannelList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + then + + peerChannelList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] + then + + peerChannelList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + + elif + + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + then + + peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + then + + peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + then + + peerChannelGetInfo \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfig \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlock \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"$TARGET_FILE\\" + + else + + echo \\"$@\\" + echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + printChannelsHelp + fi + +} + +printChannelsHelp() { + echo \\"Channel management commands:\\" + echo \\"\\" + + echo \\"fablo channel list org1 peer0\\" + echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel list org1 peer1\\" + echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel list org2 peer0\\" + echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org1 peer0\\" + echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org1 peer1\\" + echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org2 peer0\\" + echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". + echo \\"\\" + +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash + +generateArtifacts() { + printHeadline \\"Generating basic configs\\" \\"U1F913\\" + + printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" + genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + + # Create directory for chaincode packages to avoid permission errors on linux + mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" +} + +startNetwork() { + printHeadline \\"Starting network\\" \\"U1F680\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + sleep 4 +} + +generateChannelsArtifacts() { + printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" + createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" +} + +installChannels() { + printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" + docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + + printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" + docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" + docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" +} + +installChaincodes() { + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/chaincode1.json\\" + else + echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + +} + +installChaincode() { + local chaincodeName=\\"$1\\" + if [ -z \\"$chaincodeName\\" ]; then + echo \\"Error: chaincode name is not provided\\" + exit 1 + fi + + local version=\\"$2\\" + if [ -z \\"$version\\" ]; then + echo \\"Error: chaincode version is not provided\\" + exit 1 + fi + + if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/chaincode1.json\\" + + else + echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi +} + +runDevModeChaincode() { + echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" + exit 1 +} + +upgradeChaincode() { + local chaincodeName=\\"$1\\" + if [ -z \\"$chaincodeName\\" ]; then + echo \\"Error: chaincode name is not provided\\" + exit 1 + fi + + local version=\\"$2\\" + if [ -z \\"$version\\" ]; then + echo \\"Error: chaincode version is not provided\\" + exit 1 + fi + + if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + + printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" + chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/chaincode1.json\\" + + else + echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi +} + +notifyOrgsAboutChannels() { + printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" + createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + + printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" + notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + + printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" + deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" + deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" +} + +printStartSuccessInfo() { + printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" +} + +stopNetwork() { + printHeadline \\"Stopping network\\" \\"U1F68F\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + sleep 4 +} + +networkDown() { + printHeadline \\"Destroying network\\" \\"U1F916\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + + printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" + for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode1\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer1.org1.example.com-chaincode1*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-chaincode1\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org2.example.com-chaincode1*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + + printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + + printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"version: '2.2' + +networks: + basic: + +services: + + ca.orderer.example.com: + container_name: ca.orderer.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7020:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.orderer.example.com: + container_name: cli.orderer.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.orderer.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=OrdererMSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - \\"../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json\\" + networks: + - basic + + orderer0.group1.orderer.example.com: + container_name: orderer0.group1.orderer.example.com + image: hyperledger/fabric-orderer:\${FABRIC_VERSION} + environment: + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 + - ORDERER_GENERAL_LISTENPORT=7030 + - ORDERER_GENERAL_GENESISMETHOD=file + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block + - ORDERER_GENERAL_LOCALMSPID=OrdererMSP + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp + - GODEBUG=netdns=go + working_dir: /var/hyperledger/orderer + command: orderer + ports: + - 7030:7030 + - 8030:9440 + volumes: + - ../fabric-config/config/:/var/hyperledger/config + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls + networks: + - basic + + ca.org1.example.com: + container_name: ca.org1.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7040:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org1.example.com: + container_name: cli.org1.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org1.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - \\"../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json\\" + networks: + - basic + + peer0.org1.example.com: + container_name: peer0.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer0.org1.example.com + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8041:9440 + - 7041:7041 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + peer1.org1.example.com: + container_name: peer1.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer1.org1.example.com + - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8042:9440 + - 7042:7042 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + + ca.org2.example.com: + container_name: ca.org2.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7060:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org2.example.com: + container_name: cli.org2.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org2.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp + - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - \\"../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json\\" + networks: + - basic + + peer0.org2.example.com: + container_name: peer0.org2.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_ID=peer0.org2.example.com + - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 + - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7061 + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8061:9440 + - 7061:7061 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash + +certsGenerate() { + local CONTAINER_NAME=certsGenerate + + local CONFIG_PATH=$1 + local CRYPTO_CONFIG_FILE_NAME=$2 + local ORG_PATH=$3 + local OUTPUT_PATH=$4 + local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH + + echo \\"Generating certs...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" + inputLog \\"ORG_PATH: $ORG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + + if [ -d \\"$FULL_CERT_PATH\\" ]; then + echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME + + # shellcheck disable=2044 + for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do + dir=$(dirname \\"$file\\") + mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + done +} + +genesisBlockCreate() { + local CONTAINER_NAME=genesisBlockCreate + + local CONFIG_PATH=$1 + local OUTPUT_PATH=$2 + local GENESIS_PROFILE_NAME=$3 + local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block + + echo \\"Creating genesis block...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" + inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + + if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then + echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + + mkdir -p \\"$OUTPUT_PATH\\" + docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createChannelTx() { + local CONTAINER_NAME=createChannelTx + + local CHANNEL_NAME=$1 + local CONFIG_PATH=$2 + local CONFIG_PROFILE=$3 + local OUTPUT_PATH=$4 + local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + + echo \\"Creating channelTx for $CHANNEL_NAME...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + + if [ -f \\"$CHANNEL_TX_PATH\\" ]; then + echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createNewChannelUpdateTx() { + local CONTAINER_NAME=createAnchorPeerUpdateTx + + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CONFIG_PROFILE=$3 + local CONFIG_PATH=$4 + local OUTPUT_PATH=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\\\ + --configPath ./fabric-config \\\\ + -profile \\"\${CONFIG_PROFILE}\\" \\\\ + -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ + -channelID \\"\${CHANNEL_NAME}\\" \\\\ + -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +notifyOrgAboutNewChannel() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel update \\\\ + -c \\"$CHANNEL_NAME\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +notifyOrgAboutNewChannelTls() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} + + echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel update \\\\ + -c \\"$CHANNEL_NAME\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ + --tls --cafile \\"$CA_CERT\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +deleteNewChannelUpdateTx() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" + inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +printHeadline() { + bold=$'\\\\e[1m' + end=$'\\\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" +} + +printItalics() { + italics=$'\\\\e[3m' + end=$'\\\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" +} + +inputLog() { + end=$'\\\\e[0m' + darkGray=$'\\\\e[90m' + + echo \\"\${darkGray} $1 \${end}\\" +} + +inputLogShort() { + end=$'\\\\e[0m' + darkGray=$'\\\\e[90m' + + echo \\"\${darkGray} $1 \${end}\\" +} + +certsRemove() { + local CERTS_DIR_PATH=$1 + rm -rf \\"$CERTS_DIR_PATH\\" +} + +removeContainer() { + CONTAINER_NAME=$1 + docker rm -f \\"$CONTAINER_NAME\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash + +printHelp() { + echo \\"Fablo is powered by SoftwareMill\\" + + echo \\"\\" + echo \\"usage: ./fabric-docker.sh \\" + echo \\"\\" + + echo \\"Commands: \\" + echo \\"\\" + echo \\"./fabric-docker.sh up\\" + echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" + echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" + echo \\"\\" + echo \\"./fabric-docker.sh down\\" + echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" + echo \\"\\" + echo \\"./fabric-docker.sh start\\" + echo -e \\"\\\\t Starts already created network.\\" + echo \\"\\" + echo \\"./fabric-docker.sh stop\\" + echo -e \\"\\\\t Stops already running network.\\" + echo \\"\\" + echo \\"./fabric-docker.sh reset\\" + echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" + echo \\"\\" + echo \\"./fabric-docker.sh channel --help\\" + echo -e \\"\\\\t Detailed help for channel management scripts.\\" + echo \\"\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash +# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u + +dockerPullIfMissing() { + local IMAGE=\\"$1\\" + if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then + docker pull --platform linux/x86_64 \\"$IMAGE\\" + fi +} + +chaincodeBuild() { + local CHAINCODE_NAME=$1 + local CHAINCODE_LANG=$2 + local CHAINCODE_DIR_PATH=$3 + local RECOMMENDED_NODE_VERSION=$4 + + mkdir -p \\"$CHAINCODE_DIR_PATH\\" + + # pull required images upfront in case of arm64 (Apple Silicon) architecture + # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu + if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + fi + if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + fi + if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + fi + fi + + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) + set +e + source ~/.nvm/nvm.sh + set -e + if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then + current_dir=\\"$(pwd)\\" + cd \\"$CHAINCODE_DIR_PATH\\" + set +u + nvm install + set -u + cd \\"$current_dir\\" + fi + fi + + NODE_VERSION=\\"$(node --version)\\" + + USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" + if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then + RECOMMENDED_NODE_VERSION=\\"8.9\\" + fi + + if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then + echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" + echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + fi + + echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" + inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + #!/bin/bash + + if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then + echo \\"yarn not supported, installing using npm instead\\" + fi + + # Default to using npm for installation and build + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + + fi + +} + +chaincodeInstall() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local CA_CERT=$8 + + echo \\"Installing chaincode on $CHANNEL_NAME...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} + +chaincodeInstantiate() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local INIT_PARAMS=$8 + local ENDORSEMENT=$9 + local CA_CERT=\${10} + local COLLECTIONS_CONFIG=\${11} + + echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" + inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ + -C \\"$CHANNEL_NAME\\" \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -c \\"$INIT_PARAMS\\" \\\\ + -P \\"$ENDORSEMENT\\" \\\\ + \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} + +chaincodeUpgrade() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local INIT_PARAMS=$8 + local ENDORSEMENT=$9 + local CA_CERT=\${10} + local COLLECTIONS_CONFIG=\${11} + + echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" + inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ + -C \\"$CHANNEL_NAME\\" \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -c \\"$INIT_PARAMS\\" \\\\ + -P \\"$ENDORSEMENT\\" \\\\ + \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash + +peerChannelList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + + echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list +} + +peerChannelGetInfo() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + + echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ + -c \\"$CHANNEL_NAME\\" +} + +peerChannelFetchConfig() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + + echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ + -c \\"$CHANNEL_NAME\\" + + docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" configtxlator proto_decode \\\\ + --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + --type common.Block | + jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlock() { + local CHANNEL_NAME=\\"$1\\" + local CLI_NAME=\\"$2\\" + local BLOCK_NAME=\\"$3\\" + local PEER_ADDRESS=\\"$4\\" + local TARGET_FILE=\\"$5\\" + local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + + echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"TARGET_FILE: $TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ + -c \\"$CHANNEL_NAME\\" + + docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ +} + +#=== TLS equivalents ========================================================= + +peerChannelListTls() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CA_CERT=$3 + + echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" +} + +peerChannelGetInfoTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + local CA_CERT=$4 + + echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" +} + +peerChannelFetchConfigTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + local CA_CERT=$5 + + echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + + docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" configtxlator proto_decode \\\\ + --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + --type common.Block | + jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlockTls() { + local CHANNEL_NAME=\\"$1\\" + local CLI_NAME=\\"$2\\" + local BLOCK_NAME=\\"$3\\" + local PEER_ADDRESS=\\"$4\\" + local CA_CERT=\\"$5\\" + local TARGET_FILE=\\"$6\\" + local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + + echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"TARGET_FILE: $TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + + docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash + +set -eu + +createChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + + local ORDERER_URL=$5 + + local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Creating channel with name: \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + + peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx + peer channel join -b \\"\${CHANNEL_NAME}\\".block + + rm -rf \\"$DIR_NAME\\" +} + +createChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") + local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" + echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" + echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" + echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + + peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + + rm -rf \\"$DIR_NAME\\" +} + +fetchChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + + local ORDERER_URL=$5 + + local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" + peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + + rm -rf \\"$DIR_NAME\\" +} + +fetchChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") + local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" + echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" + echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" + echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + + rm -rf \\"$DIR_NAME\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash + +__getOrdererAndPeerNodes() { + echo \\" + orderer0.group1.orderer.example.com + peer0.org1.example.com + peer1.org1.example.com + peer0.org2.example.com + \\" +} + +__getCASQLiteNodes() { + echo \\" + ca.orderer.example.com + ca.org1.example.com + ca.org2.example.com + \\" +} + +__getCAPostgresNodes() { + echo \\" + \\" +} + +__createSnapshot() { + cd \\"$FABLO_NETWORK_ROOT/..\\" + backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + + if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then + echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + exit 1 + fi + + mkdir -p \\"$backup_dir\\" + cp -R ./fablo-target \\"$backup_dir/\\" + + for node in $(__getCASQLiteNodes); do + echo \\"Saving state of $node...\\" + mkdir -p \\"$backup_dir/$node\\" + docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + done + + for node in $(__getCAPostgresNodes); do + echo \\"Saving state of $node...\\" + mkdir -p \\"$backup_dir/$node/pg-data\\" + docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + done + + for node in $(__getOrdererAndPeerNodes); do + echo \\"Saving state of $node...\\" + docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + done +} + +__cloneSnapshot() { + cd \\"$FABLO_NETWORK_ROOT/..\\" + target_dir=\\"$1\\" + hook_cmd=\\"$2\\" + + if [ -d \\"$target_dir/fablo-target\\" ]; then + echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + exit 1 + fi + + cp -R ./fablo-target \\"$target_dir/fablo-target\\" + + if [ -n \\"$hook_cmd\\" ]; then + echo \\"Executing pre-restore hook: '$hook_cmd'\\" + (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + fi + + (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + + for node in $(__getCASQLiteNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + fi + done + + for node in $(__getCAPostgresNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + fi + done + + for node in $(__getOrdererAndPeerNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + fi + done +} + +createSnapshot() { + (set -eu && __createSnapshot \\"$1\\") +} + +cloneSnapshot() { + (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") +} +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +"#!/usr/bin/env bash + +# The code from this file was called after Fablo generated Hyperledger Fabric configuration +echo \\"Executing post-generate hook\\" +" +`; + +exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper files from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` +Array [ + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/.gitignore", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/collections/chaincode1.json", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/configtx.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/.env", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/hooks/post-generate.sh", +] +`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap new file mode 100644 index 00000000..18e71908 --- /dev/null +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -0,0 +1,3086 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"/config +/crypto-config +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"################################################################################ +# SECTION: Capabilities +################################################################################ +Capabilities: + Channel: &ChannelCapabilities + V1_4_3: true + Orderer: &OrdererCapabilities + V1_4_2: true + Application: &ApplicationCapabilities + V1_4_2: true + +################################################################################ +# CHANNEL Defaults +################################################################################ +Channel: &ChannelDefaults + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + Capabilities: + <<: *ChannelCapabilities + +################################################################################ +# Section: Organizations +################################################################################ +Organizations: + - &Orderer + Name: OrdererMSP + ID: OrdererMSP + MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('OrdererMSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + + AnchorPeers: + + - &Org1 + Name: Org1MSP + ID: Org1MSP + MSPDir: crypto-config/peerOrganizations/org1.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('Org1MSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + + AnchorPeers: + - Host: peer0.org1.example.com + Port: 7041 + + - Host: peer1.org1.example.com + Port: 7042 + +################################################################################ +# SECTION: Application +################################################################################ +Application: &ApplicationDefaults + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Application policies, their canonical path is + # /Channel/Application/ + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + Endorsement: + Type: ImplicitMeta + Rule: \\"MAJORITY Endorsement\\" + Capabilities: + <<: *ApplicationCapabilities + +################################################################################ +# SECTION: Orderer +################################################################################ +Orderer: &Group1Defaults + OrdererType: etcdraft + Addresses: + - orderer0.group1.orderer.example.com:7030 + EtcdRaft: + Consenters: + - Host: orderer0.group1.orderer.example.com + Port: 7030 + ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt + ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt + + BatchTimeout: 2s + BatchSize: + MaxMessageCount: 10 + AbsoluteMaxBytes: 99 MB + PreferredMaxBytes: 512 KB + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Orderer policies, their canonical path is + # /Channel/Orderer/ + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + # BlockValidation specifies what signatures must be included in the block + # from the orderer for the peer to validate it. + BlockValidation: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Capabilities: + <<: *OrdererCapabilities + +################################################################################ +# Profile +################################################################################ +# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml + +Profiles: + # Profile used to create Genesis block for group group1 # + Group1Genesis: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + + # Profile used to create channeltx for my-channel1 # + MyChannel1: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-orderer\\", + \\"description\\": \\"Connection profile for Orderer in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Orderer\\" + }, + \\"organizations\\": { + \\"Orderer\\": { + \\"mspid\\": \\"OrdererMSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.orderer.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpcs://localhost:7041\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + } + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpcs://localhost:7042\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + } + } + }, + \\"certificateAuthorities\\": { + \\"ca.orderer.example.com\\": { + \\"url\\": \\"https://localhost:7020\\", + \\"caName\\": \\"ca.orderer.example.com\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" + }, + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"name: fablo-test-network-orderer +description: Connection profile for Orderer in Fablo network +version: 1.0.0 +client: + organization: Orderer +organizations: + Orderer: + mspid: OrdererMSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + certificateAuthorities: + - ca.orderer.example.com +peers: + peer0.org1.example.com: + url: grpcs://localhost:7041 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer0.org1.example.com + peer1.org1.example.com: + url: grpcs://localhost:7042 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer1.org1.example.com +certificateAuthorities: + ca.orderer.example.com: + url: https://localhost:7020 + caName: ca.orderer.example.com + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-org1\\", + \\"description\\": \\"Connection profile for Org1 in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Org1\\" + }, + \\"organizations\\": { + \\"Org1\\": { + \\"mspid\\": \\"Org1MSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.org1.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpcs://localhost:7041\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + } + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpcs://localhost:7042\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + } + } + }, + \\"certificateAuthorities\\": { + \\"ca.org1.example.com\\": { + \\"url\\": \\"https://localhost:7040\\", + \\"caName\\": \\"ca.org1.example.com\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" + }, + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"name: fablo-test-network-org1 +description: Connection profile for Org1 in Fablo network +version: 1.0.0 +client: + organization: Org1 +organizations: + Org1: + mspid: Org1MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + certificateAuthorities: + - ca.org1.example.com +peers: + peer0.org1.example.com: + url: grpcs://localhost:7041 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer0.org1.example.com + peer1.org1.example.com: + url: grpcs://localhost:7042 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer1.org1.example.com +certificateAuthorities: + ca.org1.example.com: + url: https://localhost:7040 + caName: ca.org1.example.com + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"PeerOrgs: + - Name: Orderer + Domain: orderer.example.com + Specs: + - Hostname: orderer0.group1 + Template: + Count: 0 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"PeerOrgs: + - Name: Org1 + Domain: org1.example.com + Specs: + Template: + Count: 2 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"{ + \\"network-configs\\": { + \\"network-org1\\": { + \\"name\\": \\"Network of Org1\\", + \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + } + }, + \\"license\\": \\"Apache-2.0\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + orderer: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org1: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash + +set -eu + +FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" + +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" + +networkUp() { + generateArtifacts + startNetwork + generateChannelsArtifacts + installChannels + installChaincodes + notifyOrgsAboutChannels + printStartSuccessInfo +} + +if [ \\"$1\\" = \\"up\\" ]; then + networkUp +elif [ \\"$1\\" = \\"down\\" ]; then + networkDown +elif [ \\"$1\\" = \\"reset\\" ]; then + networkDown + networkUp +elif [ \\"$1\\" = \\"start\\" ]; then + startNetwork +elif [ \\"$1\\" = \\"stop\\" ]; then + stopNetwork +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then + installChaincodes +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then + installChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then + upgradeChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then + runDevModeChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then + chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"channel\\" ]; then + channelQuery \\"\${@:2}\\" +elif [ \\"$1\\" = \\"snapshot\\" ]; then + createSnapshot \\"$2\\" +elif [ \\"$1\\" = \\"clone-to\\" ]; then + cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" +elif [ \\"$1\\" = \\"help\\" ]; then + printHelp +elif [ \\"$1\\" = \\"--help\\" ]; then + printHelp +else + echo \\"No command specified\\" + echo \\"Basic commands are: up, down, start, stop, reset\\" + echo \\"To list channel query helper commands type: 'fablo channel --help'\\" + echo \\"Also check: 'chaincode install'\\" + echo \\"Use 'help' or '--help' for more information\\" +fi +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"FABLO_VERSION=1.2.1-unstable.0 +FABLO_BUILD= +FABLO_REST_VERSION=0.1.0 +HYPERLEDGER_EXPLORER_VERSION=1.1.8 + +COUCHDB_VERSION=3.1 +FABRIC_COUCHDB_VERSION=0.4.18 + +FABLO_CONFIG= +CHAINCODES_BASE_DIR= + +COMPOSE_PROJECT_NAME= +LOGGING_LEVEL=debug + +FABRIC_VERSION=1.4.6 +FABRIC_CA_VERSION=1.4.6 +FABRIC_CA_POSTGRES_VERSION=14 +FABRIC_CCENV_VERSION=1.4.6 +FABRIC_BASEOS_VERSION=0.4.9 +FABRIC_JAVAENV_VERSION=1.4 +FABRIC_NODEENV_VERSION=1.4 +RECOMMENDED_NODE_VERSION=12 + +ROOT_CA_ADMIN_NAME=admin +ROOT_CA_ADMIN_PASSWORD=adminpw + +ORDERER_CA_ADMIN_NAME=admin +ORDERER_CA_ADMIN_PASSWORD=adminpw + +ORG1_CA_ADMIN_NAME=admin +ORG1_CA_ADMIN_PASSWORD=adminpw + +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash + +chaincodeList() { + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + peer_certs=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + if [ \\"$2\\" = \\"my-channel1\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" + +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash + +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" + +set -eu + +channelQuery() { + echo \\"-> Channel query: \\" + \\"$@\\" + + if [ \\"$#\\" -eq 1 ]; then + printChannelsHelp + + elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + + peerChannelListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + then + + peerChannelListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif + + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + then + + peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + then + + peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + + else + + echo \\"$@\\" + echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + printChannelsHelp + fi + +} + +printChannelsHelp() { + echo \\"Channel management commands:\\" + echo \\"\\" + + echo \\"fablo channel list org1 peer0\\" + echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel list org1 peer1\\" + echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org1 peer0\\" + echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org1 peer1\\" + echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". + echo \\"\\" + +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash + +generateArtifacts() { + printHeadline \\"Generating basic configs\\" \\"U1F913\\" + + printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" + genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + + # Create directory for chaincode packages to avoid permission errors on linux + mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" +} + +startNetwork() { + printHeadline \\"Starting network\\" \\"U1F680\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + sleep 4 +} + +generateChannelsArtifacts() { + printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" + createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" +} + +installChannels() { + printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" + docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + + printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" + docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" +} + +installChaincodes() { + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + else + echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + +} + +installChaincode() { + local chaincodeName=\\"$1\\" + if [ -z \\"$chaincodeName\\" ]; then + echo \\"Error: chaincode name is not provided\\" + exit 1 + fi + + local version=\\"$2\\" + if [ -z \\"$version\\" ]; then + echo \\"Error: chaincode version is not provided\\" + exit 1 + fi + + if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + + else + echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi +} + +runDevModeChaincode() { + echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" + exit 1 +} + +upgradeChaincode() { + local chaincodeName=\\"$1\\" + if [ -z \\"$chaincodeName\\" ]; then + echo \\"Error: chaincode name is not provided\\" + exit 1 + fi + + local version=\\"$2\\" + if [ -z \\"$version\\" ]; then + echo \\"Error: chaincode version is not provided\\" + exit 1 + fi + + if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" + chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + + else + echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi +} + +notifyOrgsAboutChannels() { + printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" + createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + + printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" + notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" + deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" +} + +printStartSuccessInfo() { + printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" +} + +stopNetwork() { + printHeadline \\"Stopping network\\" \\"U1F68F\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + sleep 4 +} + +networkDown() { + printHeadline \\"Destroying network\\" \\"U1F916\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + + printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" + for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode1\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer1.org1.example.com-chaincode1*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + + printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + + printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"version: '2.2' + +networks: + basic: + +services: + + ca.orderer.example.com: + container_name: ca.orderer.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - FABRIC_CA_SERVER_TLS_ENABLED=true + ports: + - 7020:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.orderer.example.com: + container_name: cli.orderer.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.orderer.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=OrdererMSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.crt + - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.key + - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/ca.crt + - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + networks: + - basic + + orderer0.group1.orderer.example.com: + container_name: orderer0.group1.orderer.example.com + image: hyperledger/fabric-orderer:\${FABRIC_VERSION} + environment: + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 + - ORDERER_GENERAL_LISTENPORT=7030 + - ORDERER_GENERAL_GENESISMETHOD=file + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block + - ORDERER_GENERAL_LOCALMSPID=OrdererMSP + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp + - GODEBUG=netdns=go + # metrics + - ORDERER_OPERATIONS_LISTENADDRESS=orderer0.group1.orderer.example.com:9440 + - ORDERER_METRICS_PROVIDER=prometheus + # enabled TLS + - ORDERER_GENERAL_TLS_ENABLED=true + - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key + - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt + - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] + - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt + - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key + - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] + working_dir: /var/hyperledger/orderer + command: orderer + ports: + - 7030:7030 + - 8030:9440 + volumes: + - ../fabric-config/config/:/var/hyperledger/config + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls + networks: + - basic + + ca.org1.example.com: + container_name: ca.org1.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - FABRIC_CA_SERVER_TLS_ENABLED=true + ports: + - 7040:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org1.example.com: + container_name: cli.org1.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org1.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.crt + - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.key + - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/ca.crt + - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + networks: + - basic + + peer0.org1.example.com: + container_name: peer0.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer0.org1.example.com + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt + - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key + - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8041:9440 + - 7041:7041 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + peer1.org1.example.com: + container_name: peer1.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer1.org1.example.com + - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt + - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key + - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8042:9440 + - 7042:7042 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash + +certsGenerate() { + local CONTAINER_NAME=certsGenerate + + local CONFIG_PATH=$1 + local CRYPTO_CONFIG_FILE_NAME=$2 + local ORG_PATH=$3 + local OUTPUT_PATH=$4 + local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH + + echo \\"Generating certs...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" + inputLog \\"ORG_PATH: $ORG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + + if [ -d \\"$FULL_CERT_PATH\\" ]; then + echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME + + # shellcheck disable=2044 + for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do + dir=$(dirname \\"$file\\") + mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + done +} + +genesisBlockCreate() { + local CONTAINER_NAME=genesisBlockCreate + + local CONFIG_PATH=$1 + local OUTPUT_PATH=$2 + local GENESIS_PROFILE_NAME=$3 + local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block + + echo \\"Creating genesis block...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" + inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + + if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then + echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + + mkdir -p \\"$OUTPUT_PATH\\" + docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createChannelTx() { + local CONTAINER_NAME=createChannelTx + + local CHANNEL_NAME=$1 + local CONFIG_PATH=$2 + local CONFIG_PROFILE=$3 + local OUTPUT_PATH=$4 + local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + + echo \\"Creating channelTx for $CHANNEL_NAME...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + + if [ -f \\"$CHANNEL_TX_PATH\\" ]; then + echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createNewChannelUpdateTx() { + local CONTAINER_NAME=createAnchorPeerUpdateTx + + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CONFIG_PROFILE=$3 + local CONFIG_PATH=$4 + local OUTPUT_PATH=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\\\ + --configPath ./fabric-config \\\\ + -profile \\"\${CONFIG_PROFILE}\\" \\\\ + -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ + -channelID \\"\${CHANNEL_NAME}\\" \\\\ + -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +notifyOrgAboutNewChannel() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel update \\\\ + -c \\"$CHANNEL_NAME\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +notifyOrgAboutNewChannelTls() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} + + echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel update \\\\ + -c \\"$CHANNEL_NAME\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ + --tls --cafile \\"$CA_CERT\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +deleteNewChannelUpdateTx() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" + inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +printHeadline() { + bold=$'\\\\e[1m' + end=$'\\\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" +} + +printItalics() { + italics=$'\\\\e[3m' + end=$'\\\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" +} + +inputLog() { + end=$'\\\\e[0m' + darkGray=$'\\\\e[90m' + + echo \\"\${darkGray} $1 \${end}\\" +} + +inputLogShort() { + end=$'\\\\e[0m' + darkGray=$'\\\\e[90m' + + echo \\"\${darkGray} $1 \${end}\\" +} + +certsRemove() { + local CERTS_DIR_PATH=$1 + rm -rf \\"$CERTS_DIR_PATH\\" +} + +removeContainer() { + CONTAINER_NAME=$1 + docker rm -f \\"$CONTAINER_NAME\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash + +printHelp() { + echo \\"Fablo is powered by SoftwareMill\\" + + echo \\"\\" + echo \\"usage: ./fabric-docker.sh \\" + echo \\"\\" + + echo \\"Commands: \\" + echo \\"\\" + echo \\"./fabric-docker.sh up\\" + echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" + echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" + echo \\"\\" + echo \\"./fabric-docker.sh down\\" + echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" + echo \\"\\" + echo \\"./fabric-docker.sh start\\" + echo -e \\"\\\\t Starts already created network.\\" + echo \\"\\" + echo \\"./fabric-docker.sh stop\\" + echo -e \\"\\\\t Stops already running network.\\" + echo \\"\\" + echo \\"./fabric-docker.sh reset\\" + echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" + echo \\"\\" + echo \\"./fabric-docker.sh channel --help\\" + echo -e \\"\\\\t Detailed help for channel management scripts.\\" + echo \\"\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash +# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u + +dockerPullIfMissing() { + local IMAGE=\\"$1\\" + if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then + docker pull --platform linux/x86_64 \\"$IMAGE\\" + fi +} + +chaincodeBuild() { + local CHAINCODE_NAME=$1 + local CHAINCODE_LANG=$2 + local CHAINCODE_DIR_PATH=$3 + local RECOMMENDED_NODE_VERSION=$4 + + mkdir -p \\"$CHAINCODE_DIR_PATH\\" + + # pull required images upfront in case of arm64 (Apple Silicon) architecture + # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu + if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + fi + if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + fi + if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + fi + fi + + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) + set +e + source ~/.nvm/nvm.sh + set -e + if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then + current_dir=\\"$(pwd)\\" + cd \\"$CHAINCODE_DIR_PATH\\" + set +u + nvm install + set -u + cd \\"$current_dir\\" + fi + fi + + NODE_VERSION=\\"$(node --version)\\" + + USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" + if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then + RECOMMENDED_NODE_VERSION=\\"8.9\\" + fi + + if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then + echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" + echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + fi + + echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" + inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + #!/bin/bash + + if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then + echo \\"yarn not supported, installing using npm instead\\" + fi + + # Default to using npm for installation and build + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + + fi + +} + +chaincodeInstall() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local CA_CERT=$8 + + echo \\"Installing chaincode on $CHANNEL_NAME...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} + +chaincodeInstantiate() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local INIT_PARAMS=$8 + local ENDORSEMENT=$9 + local CA_CERT=\${10} + local COLLECTIONS_CONFIG=\${11} + + echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" + inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ + -C \\"$CHANNEL_NAME\\" \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -c \\"$INIT_PARAMS\\" \\\\ + -P \\"$ENDORSEMENT\\" \\\\ + \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} + +chaincodeUpgrade() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local INIT_PARAMS=$8 + local ENDORSEMENT=$9 + local CA_CERT=\${10} + local COLLECTIONS_CONFIG=\${11} + + echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" + inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ + -C \\"$CHANNEL_NAME\\" \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -c \\"$INIT_PARAMS\\" \\\\ + -P \\"$ENDORSEMENT\\" \\\\ + \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash + +peerChannelList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + + echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list +} + +peerChannelGetInfo() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + + echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ + -c \\"$CHANNEL_NAME\\" +} + +peerChannelFetchConfig() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + + echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ + -c \\"$CHANNEL_NAME\\" + + docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" configtxlator proto_decode \\\\ + --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + --type common.Block | + jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlock() { + local CHANNEL_NAME=\\"$1\\" + local CLI_NAME=\\"$2\\" + local BLOCK_NAME=\\"$3\\" + local PEER_ADDRESS=\\"$4\\" + local TARGET_FILE=\\"$5\\" + local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + + echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"TARGET_FILE: $TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ + -c \\"$CHANNEL_NAME\\" + + docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ +} + +#=== TLS equivalents ========================================================= + +peerChannelListTls() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CA_CERT=$3 + + echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" +} + +peerChannelGetInfoTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + local CA_CERT=$4 + + echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" +} + +peerChannelFetchConfigTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + local CA_CERT=$5 + + echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + + docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" configtxlator proto_decode \\\\ + --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + --type common.Block | + jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlockTls() { + local CHANNEL_NAME=\\"$1\\" + local CLI_NAME=\\"$2\\" + local BLOCK_NAME=\\"$3\\" + local PEER_ADDRESS=\\"$4\\" + local CA_CERT=\\"$5\\" + local TARGET_FILE=\\"$6\\" + local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + + echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"TARGET_FILE: $TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + + docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash + +set -eu + +createChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + + local ORDERER_URL=$5 + + local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Creating channel with name: \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + + peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx + peer channel join -b \\"\${CHANNEL_NAME}\\".block + + rm -rf \\"$DIR_NAME\\" +} + +createChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") + local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" + echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" + echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" + echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + + peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + + rm -rf \\"$DIR_NAME\\" +} + +fetchChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + + local ORDERER_URL=$5 + + local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" + peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + + rm -rf \\"$DIR_NAME\\" +} + +fetchChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") + local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" + echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" + echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" + echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + + rm -rf \\"$DIR_NAME\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash + +__getOrdererAndPeerNodes() { + echo \\" + orderer0.group1.orderer.example.com + peer0.org1.example.com + peer1.org1.example.com + \\" +} + +__getCASQLiteNodes() { + echo \\" + ca.orderer.example.com + ca.org1.example.com + \\" +} + +__getCAPostgresNodes() { + echo \\" + \\" +} + +__createSnapshot() { + cd \\"$FABLO_NETWORK_ROOT/..\\" + backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + + if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then + echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + exit 1 + fi + + mkdir -p \\"$backup_dir\\" + cp -R ./fablo-target \\"$backup_dir/\\" + + for node in $(__getCASQLiteNodes); do + echo \\"Saving state of $node...\\" + mkdir -p \\"$backup_dir/$node\\" + docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + done + + for node in $(__getCAPostgresNodes); do + echo \\"Saving state of $node...\\" + mkdir -p \\"$backup_dir/$node/pg-data\\" + docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + done + + for node in $(__getOrdererAndPeerNodes); do + echo \\"Saving state of $node...\\" + docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + done +} + +__cloneSnapshot() { + cd \\"$FABLO_NETWORK_ROOT/..\\" + target_dir=\\"$1\\" + hook_cmd=\\"$2\\" + + if [ -d \\"$target_dir/fablo-target\\" ]; then + echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + exit 1 + fi + + cp -R ./fablo-target \\"$target_dir/fablo-target\\" + + if [ -n \\"$hook_cmd\\" ]; then + echo \\"Executing pre-restore hook: '$hook_cmd'\\" + (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + fi + + (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + + for node in $(__getCASQLiteNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + fi + done + + for node in $(__getCAPostgresNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + fi + done + + for node in $(__getOrdererAndPeerNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + fi + done +} + +createSnapshot() { + (set -eu && __createSnapshot \\"$1\\") +} + +cloneSnapshot() { + (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") +} +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +"#!/usr/bin/env bash + +# The code from this file was called after Fablo generated Hyperledger Fabric configuration +echo \\"Executing post-generate hook\\" +" +`; + +exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper files from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` +Array [ + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/.gitignore", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/.env", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/hooks/post-generate.sh", +] +`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap new file mode 100644 index 00000000..02f04ac8 --- /dev/null +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -0,0 +1,3903 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"/config +/crypto-config +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"################################################################################ +# SECTION: Capabilities +################################################################################ +Capabilities: + Channel: &ChannelCapabilities + V1_4_3: true + Orderer: &OrdererCapabilities + V1_4_2: true + Application: &ApplicationCapabilities + V1_4_2: true + +################################################################################ +# CHANNEL Defaults +################################################################################ +Channel: &ChannelDefaults + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + Capabilities: + <<: *ChannelCapabilities + +################################################################################ +# Section: Organizations +################################################################################ +Organizations: + - &Orderer + Name: OrdererMSP + ID: OrdererMSP + MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('OrdererMSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + + AnchorPeers: + + - &Org1 + Name: Org1MSP + ID: Org1MSP + MSPDir: crypto-config/peerOrganizations/org1.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('Org1MSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + + AnchorPeers: + - Host: peer0.org1.example.com + Port: 7041 + + - Host: peer1.org1.example.com + Port: 7042 + + - &Org2 + Name: Org2MSP + ID: Org2MSP + MSPDir: crypto-config/peerOrganizations/org2.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('Org2MSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + + AnchorPeers: + - Host: peer0.org2.example.com + Port: 7061 + + - Host: peer1.org2.example.com + Port: 7062 + +################################################################################ +# SECTION: Application +################################################################################ +Application: &ApplicationDefaults + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Application policies, their canonical path is + # /Channel/Application/ + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + Endorsement: + Type: ImplicitMeta + Rule: \\"MAJORITY Endorsement\\" + Capabilities: + <<: *ApplicationCapabilities + +################################################################################ +# SECTION: Orderer +################################################################################ +Orderer: &Group1Defaults + OrdererType: solo + Addresses: + - orderer0.group1.orderer.example.com:7030 + BatchTimeout: 2s + BatchSize: + MaxMessageCount: 10 + AbsoluteMaxBytes: 99 MB + PreferredMaxBytes: 512 KB + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Orderer policies, their canonical path is + # /Channel/Orderer/ + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + # BlockValidation specifies what signatures must be included in the block + # from the orderer for the peer to validate it. + BlockValidation: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Capabilities: + <<: *OrdererCapabilities + +################################################################################ +# Profile +################################################################################ +# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml + +Profiles: + # Profile used to create Genesis block for group group1 # + Group1Genesis: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 + + # Profile used to create channeltx for my-channel1 # + MyChannel1: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 + + # Profile used to create channeltx for my-channel2 # + MyChannel2: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-orderer\\", + \\"description\\": \\"Connection profile for Orderer in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Orderer\\" + }, + \\"organizations\\": { + \\"Orderer\\": { + \\"mspid\\": \\"OrdererMSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\", + \\"peer1.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.orderer.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7041\\" + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7042\\" + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7061\\" + }, + \\"peer1.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7062\\" + } + }, + \\"certificateAuthorities\\": { + \\"ca.orderer.example.com\\": { + \\"url\\": \\"http://localhost:7020\\", + \\"caName\\": \\"ca.orderer.example.com\\", + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"name: fablo-test-network-orderer +description: Connection profile for Orderer in Fablo network +version: 1.0.0 +client: + organization: Orderer +organizations: + Orderer: + mspid: OrdererMSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + - peer1.org2.example.com + certificateAuthorities: + - ca.orderer.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 + peer1.org2.example.com: + url: grpc://localhost:7062 +certificateAuthorities: + ca.orderer.example.com: + url: http://localhost:7020 + caName: ca.orderer.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-org1\\", + \\"description\\": \\"Connection profile for Org1 in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Org1\\" + }, + \\"organizations\\": { + \\"Org1\\": { + \\"mspid\\": \\"Org1MSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\", + \\"peer1.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.org1.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7041\\" + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7042\\" + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7061\\" + }, + \\"peer1.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7062\\" + } + }, + \\"certificateAuthorities\\": { + \\"ca.org1.example.com\\": { + \\"url\\": \\"http://localhost:7040\\", + \\"caName\\": \\"ca.org1.example.com\\", + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"name: fablo-test-network-org1 +description: Connection profile for Org1 in Fablo network +version: 1.0.0 +client: + organization: Org1 +organizations: + Org1: + mspid: Org1MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + - peer1.org2.example.com + certificateAuthorities: + - ca.org1.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 + peer1.org2.example.com: + url: grpc://localhost:7062 +certificateAuthorities: + ca.org1.example.com: + url: http://localhost:7040 + caName: ca.org1.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-org2\\", + \\"description\\": \\"Connection profile for Org2 in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Org2\\" + }, + \\"organizations\\": { + \\"Org2\\": { + \\"mspid\\": \\"Org2MSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\", + \\"peer1.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.org2.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7041\\" + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7042\\" + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7061\\" + }, + \\"peer1.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7062\\" + } + }, + \\"certificateAuthorities\\": { + \\"ca.org2.example.com\\": { + \\"url\\": \\"http://localhost:7060\\", + \\"caName\\": \\"ca.org2.example.com\\", + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"name: fablo-test-network-org2 +description: Connection profile for Org2 in Fablo network +version: 1.0.0 +client: + organization: Org2 +organizations: + Org2: + mspid: Org2MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + - peer1.org2.example.com + certificateAuthorities: + - ca.org2.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 + peer1.org2.example.com: + url: grpc://localhost:7062 +certificateAuthorities: + ca.org2.example.com: + url: http://localhost:7060 + caName: ca.org2.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"PeerOrgs: + - Name: Orderer + Domain: orderer.example.com + Specs: + - Hostname: orderer0.group1 + Template: + Count: 0 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"PeerOrgs: + - Name: Org1 + Domain: org1.example.com + Specs: + Template: + Count: 2 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"PeerOrgs: + - Name: Org2 + Domain: org2.example.com + Specs: + Template: + Count: 2 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"{ + \\"network-configs\\": { + \\"network-org1\\": { + \\"name\\": \\"Network of Org1\\", + \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + }, + \\"network-org2\\": { + \\"name\\": \\"Network of Org2\\", + \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + } + }, + \\"license\\": \\"Apache-2.0\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + orderer: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org1: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org2: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash + +set -eu + +FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" + +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" + +networkUp() { + generateArtifacts + startNetwork + generateChannelsArtifacts + installChannels + installChaincodes + notifyOrgsAboutChannels + printStartSuccessInfo +} + +if [ \\"$1\\" = \\"up\\" ]; then + networkUp +elif [ \\"$1\\" = \\"down\\" ]; then + networkDown +elif [ \\"$1\\" = \\"reset\\" ]; then + networkDown + networkUp +elif [ \\"$1\\" = \\"start\\" ]; then + startNetwork +elif [ \\"$1\\" = \\"stop\\" ]; then + stopNetwork +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then + installChaincodes +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then + installChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then + upgradeChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then + runDevModeChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then + chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"channel\\" ]; then + channelQuery \\"\${@:2}\\" +elif [ \\"$1\\" = \\"snapshot\\" ]; then + createSnapshot \\"$2\\" +elif [ \\"$1\\" = \\"clone-to\\" ]; then + cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" +elif [ \\"$1\\" = \\"help\\" ]; then + printHelp +elif [ \\"$1\\" = \\"--help\\" ]; then + printHelp +else + echo \\"No command specified\\" + echo \\"Basic commands are: up, down, start, stop, reset\\" + echo \\"To list channel query helper commands type: 'fablo channel --help'\\" + echo \\"Also check: 'chaincode install'\\" + echo \\"Use 'help' or '--help' for more information\\" +fi +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"FABLO_VERSION=1.2.1-unstable.0 +FABLO_BUILD= +FABLO_REST_VERSION=0.1.0 +HYPERLEDGER_EXPLORER_VERSION=1.1.8 + +COUCHDB_VERSION=3.1 +FABRIC_COUCHDB_VERSION=0.4.18 + +FABLO_CONFIG= +CHAINCODES_BASE_DIR= + +COMPOSE_PROJECT_NAME= +LOGGING_LEVEL=info + +FABRIC_VERSION=1.4.6 +FABRIC_CA_VERSION=1.4.6 +FABRIC_CA_POSTGRES_VERSION=14 +FABRIC_CCENV_VERSION=1.4.6 +FABRIC_BASEOS_VERSION=0.4.9 +FABRIC_JAVAENV_VERSION=1.4 +FABRIC_NODEENV_VERSION=1.4 +RECOMMENDED_NODE_VERSION=12 + +ROOT_CA_ADMIN_NAME=admin +ROOT_CA_ADMIN_PASSWORD=adminpw + +ORDERER_CA_ADMIN_NAME=admin +ORDERER_CA_ADMIN_PASSWORD=adminpw + +ORG1_CA_ADMIN_NAME=admin +ORG1_CA_ADMIN_PASSWORD=adminpw + +ORG2_CA_ADMIN_NAME=admin +ORG2_CA_ADMIN_PASSWORD=adminpw + +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash + +chaincodeList() { + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + then + + peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer1.org2.example.com\\" ] + then + + peerChaincodeList \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"$2\\" # $2 is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash + +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" + +set -eu + +channelQuery() { + echo \\"-> Channel query: \\" + \\"$@\\" + + if [ \\"$#\\" -eq 1 ]; then + printChannelsHelp + + elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + + peerChannelList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + then + + peerChannelList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] + then + + peerChannelList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer1\\" ] + then + + peerChannelList \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" + + elif + + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + then + + peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + then + + peerChannelGetInfo \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfig \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlock \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + then + + peerChannelGetInfo \\"my-channel2\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfig \\"my-channel2\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlock \\"my-channel2\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer1\\" ] + then + + peerChannelGetInfo \\"my-channel2\\" \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfig \\"my-channel2\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org2.example.com:7062\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlock \\"my-channel2\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org2.example.com:7062\\" \\"$TARGET_FILE\\" + + else + + echo \\"$@\\" + echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + printChannelsHelp + fi + +} + +printChannelsHelp() { + echo \\"Channel management commands:\\" + echo \\"\\" + + echo \\"fablo channel list org1 peer0\\" + echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel list org1 peer1\\" + echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel list org2 peer0\\" + echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". + echo \\"\\" + + echo \\"fablo channel list org2 peer1\\" + echo -e \\"\\\\t List channels on 'peer1' of 'Org2'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org1 peer0\\" + echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org2 peer0\\" + echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel2 org1 peer1\\" + echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel2 org1 peer1 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel2 org1 peer1 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel2 org2 peer1\\" + echo -e \\"\\\\t Get channel info on 'peer1' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel2 org2 peer1 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel2 org2 peer1 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'\\". + echo \\"\\" + +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash + +generateArtifacts() { + printHeadline \\"Generating basic configs\\" \\"U1F913\\" + + printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" + genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + + # Create directory for chaincode packages to avoid permission errors on linux + mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" +} + +startNetwork() { + printHeadline \\"Starting network\\" \\"U1F680\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + sleep 4 +} + +generateChannelsArtifacts() { + printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" + createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline \\"Generating config for 'my-channel2'\\" \\"U1F913\\" + createChannelTx \\"my-channel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" +} + +installChannels() { + printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" + docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + + printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" + docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printHeadline \\"Creating 'my-channel2' on Org1/peer1\\" \\"U1F63B\\" + docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + + printItalics \\"Joining 'my-channel2' on Org2/peer1\\" \\"U1F638\\" + docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" +} + +installChaincodes() { + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"\\" + else + echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + +} + +installChaincode() { + local chaincodeName=\\"$1\\" + if [ -z \\"$chaincodeName\\" ]; then + echo \\"Error: chaincode name is not provided\\" + exit 1 + fi + + local version=\\"$2\\" + if [ -z \\"$version\\" ]; then + echo \\"Error: chaincode version is not provided\\" + exit 1 + fi + + if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"\\" + + else + echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi +} + +runDevModeChaincode() { + echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" + exit 1 +} + +upgradeChaincode() { + local chaincodeName=\\"$1\\" + if [ -z \\"$chaincodeName\\" ]; then + echo \\"Error: chaincode name is not provided\\" + exit 1 + fi + + local version=\\"$2\\" + if [ -z \\"$version\\" ]; then + echo \\"Error: chaincode version is not provided\\" + exit 1 + fi + + if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + + printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" + chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"\\" + + else + echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi +} + +notifyOrgsAboutChannels() { + printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" + createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + createNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + createNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + + printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" + notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + notifyOrgAboutNewChannel \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + notifyOrgAboutNewChannel \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + + printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" + deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" + deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" + deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" + deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" +} + +printStartSuccessInfo() { + printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" +} + +stopNetwork() { + printHeadline \\"Stopping network\\" \\"U1F68F\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + sleep 4 +} + +networkDown() { + printHeadline \\"Destroying network\\" \\"U1F916\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + + printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" + for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-chaincode1\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org2.example.com-chaincode1*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + + printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + + printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"version: '2.2' + +networks: + basic: + +services: + + ca.orderer.example.com: + container_name: ca.orderer.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7020:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.orderer.example.com: + container_name: cli.orderer.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.orderer.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=OrdererMSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + networks: + - basic + + orderer0.group1.orderer.example.com: + container_name: orderer0.group1.orderer.example.com + image: hyperledger/fabric-orderer:\${FABRIC_VERSION} + environment: + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 + - ORDERER_GENERAL_LISTENPORT=7030 + - ORDERER_GENERAL_GENESISMETHOD=file + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block + - ORDERER_GENERAL_LOCALMSPID=OrdererMSP + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp + - GODEBUG=netdns=go + working_dir: /var/hyperledger/orderer + command: orderer + ports: + - 7030:7030 + - 8030:9440 + volumes: + - ../fabric-config/config/:/var/hyperledger/config + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls + networks: + - basic + + ca.org1.example.com: + container_name: ca.org1.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7040:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org1.example.com: + container_name: cli.org1.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org1.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + networks: + - basic + + peer0.org1.example.com: + container_name: peer0.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer0.org1.example.com + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8041:9440 + - 7041:7041 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + peer1.org1.example.com: + container_name: peer1.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer1.org1.example.com + - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8042:9440 + - 7042:7042 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + + ca.org2.example.com: + container_name: ca.org2.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7060:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org2.example.com: + container_name: cli.org2.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org2.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp + - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + networks: + - basic + + peer0.org2.example.com: + container_name: peer0.org2.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_ID=peer0.org2.example.com + - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 + - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8061:9440 + - 7061:7061 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + peer1.org2.example.com: + container_name: peer1.org2.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_ID=peer1.org2.example.com + - CORE_PEER_ADDRESS=peer1.org2.example.com:7062 + - CORE_PEER_LISTENADDRESS=peer1.org2.example.com:7062 + - CORE_PEER_GOSSIP_ENDPOINT=peer1.org2.example.com:7062 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7062 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer1.org2.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8062:9440 + - 7062:7062 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash + +certsGenerate() { + local CONTAINER_NAME=certsGenerate + + local CONFIG_PATH=$1 + local CRYPTO_CONFIG_FILE_NAME=$2 + local ORG_PATH=$3 + local OUTPUT_PATH=$4 + local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH + + echo \\"Generating certs...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" + inputLog \\"ORG_PATH: $ORG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + + if [ -d \\"$FULL_CERT_PATH\\" ]; then + echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME + + # shellcheck disable=2044 + for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do + dir=$(dirname \\"$file\\") + mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + done +} + +genesisBlockCreate() { + local CONTAINER_NAME=genesisBlockCreate + + local CONFIG_PATH=$1 + local OUTPUT_PATH=$2 + local GENESIS_PROFILE_NAME=$3 + local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block + + echo \\"Creating genesis block...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" + inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + + if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then + echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + + mkdir -p \\"$OUTPUT_PATH\\" + docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createChannelTx() { + local CONTAINER_NAME=createChannelTx + + local CHANNEL_NAME=$1 + local CONFIG_PATH=$2 + local CONFIG_PROFILE=$3 + local OUTPUT_PATH=$4 + local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + + echo \\"Creating channelTx for $CHANNEL_NAME...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + + if [ -f \\"$CHANNEL_TX_PATH\\" ]; then + echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createNewChannelUpdateTx() { + local CONTAINER_NAME=createAnchorPeerUpdateTx + + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CONFIG_PROFILE=$3 + local CONFIG_PATH=$4 + local OUTPUT_PATH=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\\\ + --configPath ./fabric-config \\\\ + -profile \\"\${CONFIG_PROFILE}\\" \\\\ + -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ + -channelID \\"\${CHANNEL_NAME}\\" \\\\ + -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +notifyOrgAboutNewChannel() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel update \\\\ + -c \\"$CHANNEL_NAME\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +notifyOrgAboutNewChannelTls() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} + + echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel update \\\\ + -c \\"$CHANNEL_NAME\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ + --tls --cafile \\"$CA_CERT\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +deleteNewChannelUpdateTx() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" + inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +printHeadline() { + bold=$'\\\\e[1m' + end=$'\\\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" +} + +printItalics() { + italics=$'\\\\e[3m' + end=$'\\\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" +} + +inputLog() { + end=$'\\\\e[0m' + darkGray=$'\\\\e[90m' + + echo \\"\${darkGray} $1 \${end}\\" +} + +inputLogShort() { + end=$'\\\\e[0m' + darkGray=$'\\\\e[90m' + + echo \\"\${darkGray} $1 \${end}\\" +} + +certsRemove() { + local CERTS_DIR_PATH=$1 + rm -rf \\"$CERTS_DIR_PATH\\" +} + +removeContainer() { + CONTAINER_NAME=$1 + docker rm -f \\"$CONTAINER_NAME\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash + +printHelp() { + echo \\"Fablo is powered by SoftwareMill\\" + + echo \\"\\" + echo \\"usage: ./fabric-docker.sh \\" + echo \\"\\" + + echo \\"Commands: \\" + echo \\"\\" + echo \\"./fabric-docker.sh up\\" + echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" + echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" + echo \\"\\" + echo \\"./fabric-docker.sh down\\" + echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" + echo \\"\\" + echo \\"./fabric-docker.sh start\\" + echo -e \\"\\\\t Starts already created network.\\" + echo \\"\\" + echo \\"./fabric-docker.sh stop\\" + echo -e \\"\\\\t Stops already running network.\\" + echo \\"\\" + echo \\"./fabric-docker.sh reset\\" + echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" + echo \\"\\" + echo \\"./fabric-docker.sh channel --help\\" + echo -e \\"\\\\t Detailed help for channel management scripts.\\" + echo \\"\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash +# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u + +dockerPullIfMissing() { + local IMAGE=\\"$1\\" + if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then + docker pull --platform linux/x86_64 \\"$IMAGE\\" + fi +} + +chaincodeBuild() { + local CHAINCODE_NAME=$1 + local CHAINCODE_LANG=$2 + local CHAINCODE_DIR_PATH=$3 + local RECOMMENDED_NODE_VERSION=$4 + + mkdir -p \\"$CHAINCODE_DIR_PATH\\" + + # pull required images upfront in case of arm64 (Apple Silicon) architecture + # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu + if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + fi + if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + fi + if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + fi + fi + + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) + set +e + source ~/.nvm/nvm.sh + set -e + if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then + current_dir=\\"$(pwd)\\" + cd \\"$CHAINCODE_DIR_PATH\\" + set +u + nvm install + set -u + cd \\"$current_dir\\" + fi + fi + + NODE_VERSION=\\"$(node --version)\\" + + USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" + if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then + RECOMMENDED_NODE_VERSION=\\"8.9\\" + fi + + if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then + echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" + echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + fi + + echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" + inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + #!/bin/bash + + if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then + echo \\"yarn not supported, installing using npm instead\\" + fi + + # Default to using npm for installation and build + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + + fi + +} + +chaincodeInstall() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local CA_CERT=$8 + + echo \\"Installing chaincode on $CHANNEL_NAME...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} + +chaincodeInstantiate() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local INIT_PARAMS=$8 + local ENDORSEMENT=$9 + local CA_CERT=\${10} + local COLLECTIONS_CONFIG=\${11} + + echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" + inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ + -C \\"$CHANNEL_NAME\\" \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -c \\"$INIT_PARAMS\\" \\\\ + -P \\"$ENDORSEMENT\\" \\\\ + \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} + +chaincodeUpgrade() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local INIT_PARAMS=$8 + local ENDORSEMENT=$9 + local CA_CERT=\${10} + local COLLECTIONS_CONFIG=\${11} + + echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" + inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ + -C \\"$CHANNEL_NAME\\" \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -c \\"$INIT_PARAMS\\" \\\\ + -P \\"$ENDORSEMENT\\" \\\\ + \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash + +peerChannelList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + + echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list +} + +peerChannelGetInfo() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + + echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ + -c \\"$CHANNEL_NAME\\" +} + +peerChannelFetchConfig() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + + echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ + -c \\"$CHANNEL_NAME\\" + + docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" configtxlator proto_decode \\\\ + --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + --type common.Block | + jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlock() { + local CHANNEL_NAME=\\"$1\\" + local CLI_NAME=\\"$2\\" + local BLOCK_NAME=\\"$3\\" + local PEER_ADDRESS=\\"$4\\" + local TARGET_FILE=\\"$5\\" + local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + + echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"TARGET_FILE: $TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ + -c \\"$CHANNEL_NAME\\" + + docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ +} + +#=== TLS equivalents ========================================================= + +peerChannelListTls() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CA_CERT=$3 + + echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" +} + +peerChannelGetInfoTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + local CA_CERT=$4 + + echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" +} + +peerChannelFetchConfigTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + local CA_CERT=$5 + + echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + + docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" configtxlator proto_decode \\\\ + --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + --type common.Block | + jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlockTls() { + local CHANNEL_NAME=\\"$1\\" + local CLI_NAME=\\"$2\\" + local BLOCK_NAME=\\"$3\\" + local PEER_ADDRESS=\\"$4\\" + local CA_CERT=\\"$5\\" + local TARGET_FILE=\\"$6\\" + local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + + echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"TARGET_FILE: $TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + + docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash + +set -eu + +createChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + + local ORDERER_URL=$5 + + local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Creating channel with name: \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + + peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx + peer channel join -b \\"\${CHANNEL_NAME}\\".block + + rm -rf \\"$DIR_NAME\\" +} + +createChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") + local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" + echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" + echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" + echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + + peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + + rm -rf \\"$DIR_NAME\\" +} + +fetchChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + + local ORDERER_URL=$5 + + local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" + peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + + rm -rf \\"$DIR_NAME\\" +} + +fetchChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") + local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" + echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" + echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" + echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + + rm -rf \\"$DIR_NAME\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash + +__getOrdererAndPeerNodes() { + echo \\" + orderer0.group1.orderer.example.com + peer0.org1.example.com + peer1.org1.example.com + peer0.org2.example.com + peer1.org2.example.com + \\" +} + +__getCASQLiteNodes() { + echo \\" + ca.orderer.example.com + ca.org1.example.com + ca.org2.example.com + \\" +} + +__getCAPostgresNodes() { + echo \\" + \\" +} + +__createSnapshot() { + cd \\"$FABLO_NETWORK_ROOT/..\\" + backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + + if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then + echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + exit 1 + fi + + mkdir -p \\"$backup_dir\\" + cp -R ./fablo-target \\"$backup_dir/\\" + + for node in $(__getCASQLiteNodes); do + echo \\"Saving state of $node...\\" + mkdir -p \\"$backup_dir/$node\\" + docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + done + + for node in $(__getCAPostgresNodes); do + echo \\"Saving state of $node...\\" + mkdir -p \\"$backup_dir/$node/pg-data\\" + docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + done + + for node in $(__getOrdererAndPeerNodes); do + echo \\"Saving state of $node...\\" + docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + done +} + +__cloneSnapshot() { + cd \\"$FABLO_NETWORK_ROOT/..\\" + target_dir=\\"$1\\" + hook_cmd=\\"$2\\" + + if [ -d \\"$target_dir/fablo-target\\" ]; then + echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + exit 1 + fi + + cp -R ./fablo-target \\"$target_dir/fablo-target\\" + + if [ -n \\"$hook_cmd\\" ]; then + echo \\"Executing pre-restore hook: '$hook_cmd'\\" + (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + fi + + (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + + for node in $(__getCASQLiteNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + fi + done + + for node in $(__getCAPostgresNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + fi + done + + for node in $(__getOrdererAndPeerNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + fi + done +} + +createSnapshot() { + (set -eu && __createSnapshot \\"$1\\") +} + +cloneSnapshot() { + (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +"#!/usr/bin/env bash + +# The code from this file was called after Fablo generated Hyperledger Fabric configuration +echo \\"Executing post-generate hook\\" +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper files from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` +Array [ + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/configtx.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/hooks/post-generate.sh", +] +`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap new file mode 100644 index 00000000..c7f95580 --- /dev/null +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -0,0 +1,3884 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"/config +/crypto-config +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/and-policy-chaincode.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"[ + { + \\"name\\": \\"org1-collection\\", + \\"policy\\": \\"OR('Org1MSP.member')\\", + \\"requiredPeerCount\\": 1, + \\"maxPeerCount\\": 3, + \\"blockToLive\\": 0, + \\"memberOnlyRead\\": true + } +]" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/or-policy-chaincode.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"[ + { + \\"name\\": \\"org1-collection\\", + \\"policy\\": \\"OR('Org1MSP.member')\\", + \\"requiredPeerCount\\": 1, + \\"maxPeerCount\\": 3, + \\"blockToLive\\": 0, + \\"memberOnlyRead\\": true + } +]" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"################################################################################ +# SECTION: Capabilities +################################################################################ +Capabilities: + Channel: &ChannelCapabilities + V1_4_3: true + Orderer: &OrdererCapabilities + V1_4_2: true + Application: &ApplicationCapabilities + V1_4_2: true + +################################################################################ +# CHANNEL Defaults +################################################################################ +Channel: &ChannelDefaults + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + Capabilities: + <<: *ChannelCapabilities + +################################################################################ +# Section: Organizations +################################################################################ +Organizations: + - &Orderer + Name: OrdererMSP + ID: OrdererMSP + MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('OrdererMSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + + AnchorPeers: + + - &Org1 + Name: Org1MSP + ID: Org1MSP + MSPDir: crypto-config/peerOrganizations/org1.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('Org1MSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + + AnchorPeers: + - Host: peer0.org1.example.com + Port: 7041 + + - Host: peer1.org1.example.com + Port: 7042 + + - &Org2 + Name: Org2MSP + ID: Org2MSP + MSPDir: crypto-config/peerOrganizations/org2.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('Org2MSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + + AnchorPeers: + - Host: peer0.org2.example.com + Port: 7061 + +################################################################################ +# SECTION: Application +################################################################################ +Application: &ApplicationDefaults + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Application policies, their canonical path is + # /Channel/Application/ + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + Endorsement: + Type: ImplicitMeta + Rule: \\"MAJORITY Endorsement\\" + Capabilities: + <<: *ApplicationCapabilities + +################################################################################ +# SECTION: Orderer +################################################################################ +Orderer: &Group1Defaults + OrdererType: solo + Addresses: + - orderer0.group1.orderer.example.com:7030 + BatchTimeout: 2s + BatchSize: + MaxMessageCount: 10 + AbsoluteMaxBytes: 99 MB + PreferredMaxBytes: 512 KB + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Orderer policies, their canonical path is + # /Channel/Orderer/ + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + # BlockValidation specifies what signatures must be included in the block + # from the orderer for the peer to validate it. + BlockValidation: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Capabilities: + <<: *OrdererCapabilities + +################################################################################ +# Profile +################################################################################ +# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml + +Profiles: + # Profile used to create Genesis block for group group1 # + Group1Genesis: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 + + # Profile used to create channeltx for my-channel1 # + MyChannel1: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-orderer\\", + \\"description\\": \\"Connection profile for Orderer in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Orderer\\" + }, + \\"organizations\\": { + \\"Orderer\\": { + \\"mspid\\": \\"OrdererMSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.orderer.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7041\\" + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7042\\" + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7061\\" + } + }, + \\"certificateAuthorities\\": { + \\"ca.orderer.example.com\\": { + \\"url\\": \\"http://localhost:7020\\", + \\"caName\\": \\"ca.orderer.example.com\\", + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"name: fablo-test-network-orderer +description: Connection profile for Orderer in Fablo network +version: 1.0.0 +client: + organization: Orderer +organizations: + Orderer: + mspid: OrdererMSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + certificateAuthorities: + - ca.orderer.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 +certificateAuthorities: + ca.orderer.example.com: + url: http://localhost:7020 + caName: ca.orderer.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-org1\\", + \\"description\\": \\"Connection profile for Org1 in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Org1\\" + }, + \\"organizations\\": { + \\"Org1\\": { + \\"mspid\\": \\"Org1MSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.org1.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7041\\" + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7042\\" + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7061\\" + } + }, + \\"certificateAuthorities\\": { + \\"ca.org1.example.com\\": { + \\"url\\": \\"http://localhost:7040\\", + \\"caName\\": \\"ca.org1.example.com\\", + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"name: fablo-test-network-org1 +description: Connection profile for Org1 in Fablo network +version: 1.0.0 +client: + organization: Org1 +organizations: + Org1: + mspid: Org1MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + certificateAuthorities: + - ca.org1.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 +certificateAuthorities: + ca.org1.example.com: + url: http://localhost:7040 + caName: ca.org1.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-org2\\", + \\"description\\": \\"Connection profile for Org2 in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Org2\\" + }, + \\"organizations\\": { + \\"Org2\\": { + \\"mspid\\": \\"Org2MSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.org2.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7041\\" + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpc://localhost:7042\\" + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpc://localhost:7061\\" + } + }, + \\"certificateAuthorities\\": { + \\"ca.org2.example.com\\": { + \\"url\\": \\"http://localhost:7060\\", + \\"caName\\": \\"ca.org2.example.com\\", + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"name: fablo-test-network-org2 +description: Connection profile for Org2 in Fablo network +version: 1.0.0 +client: + organization: Org2 +organizations: + Org2: + mspid: Org2MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + certificateAuthorities: + - ca.org2.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 +certificateAuthorities: + ca.org2.example.com: + url: http://localhost:7060 + caName: ca.org2.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"PeerOrgs: + - Name: Orderer + Domain: orderer.example.com + Specs: + - Hostname: orderer0.group1 + Template: + Count: 0 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"PeerOrgs: + - Name: Org1 + Domain: org1.example.com + Specs: + Template: + Count: 2 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"PeerOrgs: + - Name: Org2 + Domain: org2.example.com + Specs: + Template: + Count: 1 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"{ + \\"network-configs\\": { + \\"network-org1\\": { + \\"name\\": \\"Network of Org1\\", + \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + }, + \\"network-org2\\": { + \\"name\\": \\"Network of Org2\\", + \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + } + }, + \\"license\\": \\"Apache-2.0\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + orderer: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org1: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org2: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +set -eu + +FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" + +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" + +networkUp() { + generateArtifacts + startNetwork + generateChannelsArtifacts + installChannels + installChaincodes + notifyOrgsAboutChannels + printStartSuccessInfo +} + +if [ \\"$1\\" = \\"up\\" ]; then + networkUp +elif [ \\"$1\\" = \\"down\\" ]; then + networkDown +elif [ \\"$1\\" = \\"reset\\" ]; then + networkDown + networkUp +elif [ \\"$1\\" = \\"start\\" ]; then + startNetwork +elif [ \\"$1\\" = \\"stop\\" ]; then + stopNetwork +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then + installChaincodes +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then + installChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then + upgradeChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then + runDevModeChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then + chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"channel\\" ]; then + channelQuery \\"\${@:2}\\" +elif [ \\"$1\\" = \\"snapshot\\" ]; then + createSnapshot \\"$2\\" +elif [ \\"$1\\" = \\"clone-to\\" ]; then + cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" +elif [ \\"$1\\" = \\"help\\" ]; then + printHelp +elif [ \\"$1\\" = \\"--help\\" ]; then + printHelp +else + echo \\"No command specified\\" + echo \\"Basic commands are: up, down, start, stop, reset\\" + echo \\"To list channel query helper commands type: 'fablo channel --help'\\" + echo \\"Also check: 'chaincode install'\\" + echo \\"Use 'help' or '--help' for more information\\" +fi +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"FABLO_VERSION=1.2.1-unstable.0 +FABLO_BUILD= +FABLO_REST_VERSION=0.1.0 +HYPERLEDGER_EXPLORER_VERSION=1.1.8 + +COUCHDB_VERSION=3.1 +FABRIC_COUCHDB_VERSION=0.4.18 + +FABLO_CONFIG= +CHAINCODES_BASE_DIR= + +COMPOSE_PROJECT_NAME= +LOGGING_LEVEL=info + +FABRIC_VERSION=1.4.11 +FABRIC_CA_VERSION=1.5.5 +FABRIC_CA_POSTGRES_VERSION=14 +FABRIC_CCENV_VERSION=1.4.11 +FABRIC_BASEOS_VERSION=0.4.9 +FABRIC_JAVAENV_VERSION=1.4 +FABRIC_NODEENV_VERSION=1.4 +RECOMMENDED_NODE_VERSION=12 + +ROOT_CA_ADMIN_NAME=admin +ROOT_CA_ADMIN_PASSWORD=adminpw + +ORDERER_CA_ADMIN_NAME=admin +ORDERER_CA_ADMIN_PASSWORD=adminpw + +ORG1_CA_ADMIN_NAME=admin +ORG1_CA_ADMIN_PASSWORD=adminpw + +ORG2_CA_ADMIN_NAME=admin +ORG2_CA_ADMIN_PASSWORD=adminpw + +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +chaincodeList() { + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name + + elif + [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + then + + peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" + +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" + +set -eu + +channelQuery() { + echo \\"-> Channel query: \\" + \\"$@\\" + + if [ \\"$#\\" -eq 1 ]; then + printChannelsHelp + + elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + + peerChannelList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + then + + peerChannelList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] + then + + peerChannelList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + + elif + + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + then + + peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + then + + peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + then + + peerChannelGetInfo \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfig \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlock \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"$TARGET_FILE\\" + + else + + echo \\"$@\\" + echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + printChannelsHelp + fi + +} + +printChannelsHelp() { + echo \\"Channel management commands:\\" + echo \\"\\" + + echo \\"fablo channel list org1 peer0\\" + echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel list org1 peer1\\" + echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel list org2 peer0\\" + echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org1 peer0\\" + echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org1 peer1\\" + echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org2 peer0\\" + echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". + echo \\"\\" + +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +generateArtifacts() { + printHeadline \\"Generating basic configs\\" \\"U1F913\\" + + printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" + genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + + # Create directory for chaincode packages to avoid permission errors on linux + mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" +} + +startNetwork() { + printHeadline \\"Starting network\\" \\"U1F680\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + sleep 4 +} + +generateChannelsArtifacts() { + printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" + createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" +} + +installChannels() { + printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" + docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + + printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" + docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" + printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" + docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" +} + +installChaincodes() { + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"or-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Instantiating chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/or-policy-chaincode.json\\" + else + echo \\"Warning! Skipping chaincode 'or-policy-chaincode' installation. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"and-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Instantiating chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/and-policy-chaincode.json\\" + else + echo \\"Warning! Skipping chaincode 'and-policy-chaincode' installation. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + +} + +installChaincode() { + local chaincodeName=\\"$1\\" + if [ -z \\"$chaincodeName\\" ]; then + echo \\"Error: chaincode name is not provided\\" + exit 1 + fi + + local version=\\"$2\\" + if [ -z \\"$version\\" ]; then + echo \\"Error: chaincode version is not provided\\" + exit 1 + fi + + if [ \\"$chaincodeName\\" = \\"or-policy-chaincode\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"or-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Instantiating chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/or-policy-chaincode.json\\" + + else + echo \\"Warning! Skipping chaincode 'or-policy-chaincode' install. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi + if [ \\"$chaincodeName\\" = \\"and-policy-chaincode\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"and-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Instantiating chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/and-policy-chaincode.json\\" + + else + echo \\"Warning! Skipping chaincode 'and-policy-chaincode' install. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi +} + +runDevModeChaincode() { + echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" + exit 1 +} + +upgradeChaincode() { + local chaincodeName=\\"$1\\" + if [ -z \\"$chaincodeName\\" ]; then + echo \\"Error: chaincode name is not provided\\" + exit 1 + fi + + local version=\\"$2\\" + if [ -z \\"$version\\" ]; then + echo \\"Error: chaincode version is not provided\\" + exit 1 + fi + + if [ \\"$chaincodeName\\" = \\"or-policy-chaincode\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"or-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + + printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + + printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + + printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Upgrading as 'Org1'. 'or-policy-chaincode' on channel 'my-channel1'\\" \\"U1F618\\" + chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/or-policy-chaincode.json\\" + + else + echo \\"Warning! Skipping chaincode 'or-policy-chaincode' upgrade. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi + if [ \\"$chaincodeName\\" = \\"and-policy-chaincode\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"and-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + + printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + + printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + + printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" + printItalics \\"Upgrading as 'Org1'. 'and-policy-chaincode' on channel 'my-channel1'\\" \\"U1F618\\" + chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/and-policy-chaincode.json\\" + + else + echo \\"Warning! Skipping chaincode 'and-policy-chaincode' upgrade. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi +} + +notifyOrgsAboutChannels() { + printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" + createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + + printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" + notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" + + printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" + deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" + deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" +} + +printStartSuccessInfo() { + printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" +} + +stopNetwork() { + printHeadline \\"Stopping network\\" \\"U1F68F\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + sleep 4 +} + +networkDown() { + printHeadline \\"Destroying network\\" \\"U1F916\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + + printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" + for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-or-policy-chaincode\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org1.example.com-or-policy-chaincode*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-or-policy-chaincode\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer1.org1.example.com-or-policy-chaincode*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-or-policy-chaincode\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org2.example.com-or-policy-chaincode*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-and-policy-chaincode\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org1.example.com-and-policy-chaincode*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-and-policy-chaincode\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer1.org1.example.com-and-policy-chaincode*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-and-policy-chaincode\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org2.example.com-and-policy-chaincode*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + + printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + + printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"version: '2.2' + +networks: + basic: + +services: + + ca.orderer.example.com: + container_name: ca.orderer.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7020:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.orderer.example.com: + container_name: cli.orderer.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.orderer.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=OrdererMSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/\\" + - \\"../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json\\" + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/\\" + - \\"../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json\\" + networks: + - basic + + orderer0.group1.orderer.example.com: + container_name: orderer0.group1.orderer.example.com + image: hyperledger/fabric-orderer:\${FABRIC_VERSION} + environment: + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 + - ORDERER_GENERAL_LISTENPORT=7030 + - ORDERER_GENERAL_GENESISMETHOD=file + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block + - ORDERER_GENERAL_LOCALMSPID=OrdererMSP + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp + - GODEBUG=netdns=go + working_dir: /var/hyperledger/orderer + command: orderer + ports: + - 7030:7030 + - 8030:9440 + volumes: + - ../fabric-config/config/:/var/hyperledger/config + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls + networks: + - basic + + ca.org1.example.com: + container_name: ca.org1.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7040:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org1.example.com: + container_name: cli.org1.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org1.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/\\" + - \\"../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json\\" + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/\\" + - \\"../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json\\" + networks: + - basic + + peer0.org1.example.com: + container_name: peer0.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer0.org1.example.com + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8041:9440 + - 7041:7041 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + peer1.org1.example.com: + container_name: peer1.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer1.org1.example.com + - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8042:9440 + - 7042:7042 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + + ca.org2.example.com: + container_name: ca.org2.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7060:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org2.example.com: + container_name: cli.org2.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org2.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp + - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/\\" + - \\"../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json\\" + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/\\" + - \\"../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json\\" + networks: + - basic + + peer0.org2.example.com: + container_name: peer0.org2.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_ID=peer0.org2.example.com + - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 + - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7061 + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8061:9440 + - 7061:7061 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +certsGenerate() { + local CONTAINER_NAME=certsGenerate + + local CONFIG_PATH=$1 + local CRYPTO_CONFIG_FILE_NAME=$2 + local ORG_PATH=$3 + local OUTPUT_PATH=$4 + local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH + + echo \\"Generating certs...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" + inputLog \\"ORG_PATH: $ORG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + + if [ -d \\"$FULL_CERT_PATH\\" ]; then + echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME + + # shellcheck disable=2044 + for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do + dir=$(dirname \\"$file\\") + mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + done +} + +genesisBlockCreate() { + local CONTAINER_NAME=genesisBlockCreate + + local CONFIG_PATH=$1 + local OUTPUT_PATH=$2 + local GENESIS_PROFILE_NAME=$3 + local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block + + echo \\"Creating genesis block...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" + inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + + if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then + echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + + mkdir -p \\"$OUTPUT_PATH\\" + docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createChannelTx() { + local CONTAINER_NAME=createChannelTx + + local CHANNEL_NAME=$1 + local CONFIG_PATH=$2 + local CONFIG_PROFILE=$3 + local OUTPUT_PATH=$4 + local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + + echo \\"Creating channelTx for $CHANNEL_NAME...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + + if [ -f \\"$CHANNEL_TX_PATH\\" ]; then + echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createNewChannelUpdateTx() { + local CONTAINER_NAME=createAnchorPeerUpdateTx + + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CONFIG_PROFILE=$3 + local CONFIG_PATH=$4 + local OUTPUT_PATH=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\\\ + --configPath ./fabric-config \\\\ + -profile \\"\${CONFIG_PROFILE}\\" \\\\ + -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ + -channelID \\"\${CHANNEL_NAME}\\" \\\\ + -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +notifyOrgAboutNewChannel() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel update \\\\ + -c \\"$CHANNEL_NAME\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +notifyOrgAboutNewChannelTls() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} + + echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel update \\\\ + -c \\"$CHANNEL_NAME\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ + --tls --cafile \\"$CA_CERT\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +deleteNewChannelUpdateTx() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" + inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +printHeadline() { + bold=$'\\\\e[1m' + end=$'\\\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" +} + +printItalics() { + italics=$'\\\\e[3m' + end=$'\\\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" +} + +inputLog() { + end=$'\\\\e[0m' + darkGray=$'\\\\e[90m' + + echo \\"\${darkGray} $1 \${end}\\" +} + +inputLogShort() { + end=$'\\\\e[0m' + darkGray=$'\\\\e[90m' + + echo \\"\${darkGray} $1 \${end}\\" +} + +certsRemove() { + local CERTS_DIR_PATH=$1 + rm -rf \\"$CERTS_DIR_PATH\\" +} + +removeContainer() { + CONTAINER_NAME=$1 + docker rm -f \\"$CONTAINER_NAME\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +printHelp() { + echo \\"Fablo is powered by SoftwareMill\\" + + echo \\"\\" + echo \\"usage: ./fabric-docker.sh \\" + echo \\"\\" + + echo \\"Commands: \\" + echo \\"\\" + echo \\"./fabric-docker.sh up\\" + echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" + echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" + echo \\"\\" + echo \\"./fabric-docker.sh down\\" + echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" + echo \\"\\" + echo \\"./fabric-docker.sh start\\" + echo -e \\"\\\\t Starts already created network.\\" + echo \\"\\" + echo \\"./fabric-docker.sh stop\\" + echo -e \\"\\\\t Stops already running network.\\" + echo \\"\\" + echo \\"./fabric-docker.sh reset\\" + echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" + echo \\"\\" + echo \\"./fabric-docker.sh channel --help\\" + echo -e \\"\\\\t Detailed help for channel management scripts.\\" + echo \\"\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash +# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u + +dockerPullIfMissing() { + local IMAGE=\\"$1\\" + if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then + docker pull --platform linux/x86_64 \\"$IMAGE\\" + fi +} + +chaincodeBuild() { + local CHAINCODE_NAME=$1 + local CHAINCODE_LANG=$2 + local CHAINCODE_DIR_PATH=$3 + local RECOMMENDED_NODE_VERSION=$4 + + mkdir -p \\"$CHAINCODE_DIR_PATH\\" + + # pull required images upfront in case of arm64 (Apple Silicon) architecture + # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu + if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + fi + if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + fi + if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + fi + fi + + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) + set +e + source ~/.nvm/nvm.sh + set -e + if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then + current_dir=\\"$(pwd)\\" + cd \\"$CHAINCODE_DIR_PATH\\" + set +u + nvm install + set -u + cd \\"$current_dir\\" + fi + fi + + NODE_VERSION=\\"$(node --version)\\" + + USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" + if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then + RECOMMENDED_NODE_VERSION=\\"8.9\\" + fi + + if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then + echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" + echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + fi + + echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" + inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + #!/bin/bash + + if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then + echo \\"yarn not supported, installing using npm instead\\" + fi + + # Default to using npm for installation and build + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + + fi + +} + +chaincodeInstall() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local CA_CERT=$8 + + echo \\"Installing chaincode on $CHANNEL_NAME...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} + +chaincodeInstantiate() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local INIT_PARAMS=$8 + local ENDORSEMENT=$9 + local CA_CERT=\${10} + local COLLECTIONS_CONFIG=\${11} + + echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" + inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ + -C \\"$CHANNEL_NAME\\" \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -c \\"$INIT_PARAMS\\" \\\\ + -P \\"$ENDORSEMENT\\" \\\\ + \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} + +chaincodeUpgrade() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local INIT_PARAMS=$8 + local ENDORSEMENT=$9 + local CA_CERT=\${10} + local COLLECTIONS_CONFIG=\${11} + + echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" + inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ + -C \\"$CHANNEL_NAME\\" \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -c \\"$INIT_PARAMS\\" \\\\ + -P \\"$ENDORSEMENT\\" \\\\ + \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +peerChannelList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + + echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list +} + +peerChannelGetInfo() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + + echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ + -c \\"$CHANNEL_NAME\\" +} + +peerChannelFetchConfig() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + + echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ + -c \\"$CHANNEL_NAME\\" + + docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" configtxlator proto_decode \\\\ + --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + --type common.Block | + jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlock() { + local CHANNEL_NAME=\\"$1\\" + local CLI_NAME=\\"$2\\" + local BLOCK_NAME=\\"$3\\" + local PEER_ADDRESS=\\"$4\\" + local TARGET_FILE=\\"$5\\" + local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + + echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"TARGET_FILE: $TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ + -c \\"$CHANNEL_NAME\\" + + docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ +} + +#=== TLS equivalents ========================================================= + +peerChannelListTls() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CA_CERT=$3 + + echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" +} + +peerChannelGetInfoTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + local CA_CERT=$4 + + echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" +} + +peerChannelFetchConfigTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + local CA_CERT=$5 + + echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + + docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" configtxlator proto_decode \\\\ + --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + --type common.Block | + jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlockTls() { + local CHANNEL_NAME=\\"$1\\" + local CLI_NAME=\\"$2\\" + local BLOCK_NAME=\\"$3\\" + local PEER_ADDRESS=\\"$4\\" + local CA_CERT=\\"$5\\" + local TARGET_FILE=\\"$6\\" + local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + + echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"TARGET_FILE: $TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + + docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +set -eu + +createChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + + local ORDERER_URL=$5 + + local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Creating channel with name: \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + + peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx + peer channel join -b \\"\${CHANNEL_NAME}\\".block + + rm -rf \\"$DIR_NAME\\" +} + +createChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") + local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" + echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" + echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" + echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + + peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + + rm -rf \\"$DIR_NAME\\" +} + +fetchChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + + local ORDERER_URL=$5 + + local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" + peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + + rm -rf \\"$DIR_NAME\\" +} + +fetchChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") + local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" + echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" + echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" + echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + + rm -rf \\"$DIR_NAME\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +__getOrdererAndPeerNodes() { + echo \\" + orderer0.group1.orderer.example.com + peer0.org1.example.com + peer1.org1.example.com + peer0.org2.example.com + \\" +} + +__getCASQLiteNodes() { + echo \\" + ca.orderer.example.com + ca.org1.example.com + ca.org2.example.com + \\" +} + +__getCAPostgresNodes() { + echo \\" + \\" +} + +__createSnapshot() { + cd \\"$FABLO_NETWORK_ROOT/..\\" + backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + + if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then + echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + exit 1 + fi + + mkdir -p \\"$backup_dir\\" + cp -R ./fablo-target \\"$backup_dir/\\" + + for node in $(__getCASQLiteNodes); do + echo \\"Saving state of $node...\\" + mkdir -p \\"$backup_dir/$node\\" + docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + done + + for node in $(__getCAPostgresNodes); do + echo \\"Saving state of $node...\\" + mkdir -p \\"$backup_dir/$node/pg-data\\" + docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + done + + for node in $(__getOrdererAndPeerNodes); do + echo \\"Saving state of $node...\\" + docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + done +} + +__cloneSnapshot() { + cd \\"$FABLO_NETWORK_ROOT/..\\" + target_dir=\\"$1\\" + hook_cmd=\\"$2\\" + + if [ -d \\"$target_dir/fablo-target\\" ]; then + echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + exit 1 + fi + + cp -R ./fablo-target \\"$target_dir/fablo-target\\" + + if [ -n \\"$hook_cmd\\" ]; then + echo \\"Executing pre-restore hook: '$hook_cmd'\\" + (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + fi + + (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + + for node in $(__getCASQLiteNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + fi + done + + for node in $(__getCAPostgresNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + fi + done + + for node in $(__getOrdererAndPeerNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + fi + done +} + +createSnapshot() { + (set -eu && __createSnapshot \\"$1\\") +} + +cloneSnapshot() { + (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +# The code from this file was called after Fablo generated Hyperledger Fabric configuration +echo \\"Executing post-generate hook\\" +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper files from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` +Array [ + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/.gitignore", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/and-policy-chaincode.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/or-policy-chaincode.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/configtx.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/explorer/config-global.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/commands-generated.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/hooks/post-generate.sh", +] +`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap new file mode 100644 index 00000000..07ad0450 --- /dev/null +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -0,0 +1,4294 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"/config +/crypto-config +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"################################################################################ +# SECTION: Capabilities +################################################################################ +Capabilities: + Channel: &ChannelCapabilities + V1_4_3: true + Orderer: &OrdererCapabilities + V1_4_2: true + Application: &ApplicationCapabilities + V1_4_2: true + +################################################################################ +# CHANNEL Defaults +################################################################################ +Channel: &ChannelDefaults + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + Capabilities: + <<: *ChannelCapabilities + +################################################################################ +# Section: Organizations +################################################################################ +Organizations: + - &Orderer + Name: OrdererMSP + ID: OrdererMSP + MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('OrdererMSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('OrdererMSP.member')\\" + + AnchorPeers: + + - &Org1 + Name: Org1MSP + ID: Org1MSP + MSPDir: crypto-config/peerOrganizations/org1.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('Org1MSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('Org1MSP.member')\\" + + AnchorPeers: + - Host: peer0.org1.example.com + Port: 7041 + + - Host: peer1.org1.example.com + Port: 7042 + + - &Org2 + Name: Org2MSP + ID: Org2MSP + MSPDir: crypto-config/peerOrganizations/org2.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + Writers: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + Admins: + Type: Signature + Rule: \\"OR('Org2MSP.admin')\\" + Endorsement: + Type: Signature + Rule: \\"OR('Org2MSP.member')\\" + + AnchorPeers: + - Host: peer0.org2.example.com + Port: 7061 + + - Host: peer1.org2.example.com + Port: 7062 + +################################################################################ +# SECTION: Application +################################################################################ +Application: &ApplicationDefaults + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Application policies, their canonical path is + # /Channel/Application/ + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + Endorsement: + Type: ImplicitMeta + Rule: \\"MAJORITY Endorsement\\" + Capabilities: + <<: *ApplicationCapabilities + +################################################################################ +# SECTION: Orderer +################################################################################ +Orderer: &Group1Defaults + OrdererType: etcdraft + Addresses: + - orderer0.group1.orderer.example.com:7030 + - orderer1.group1.orderer.example.com:7031 + - orderer2.group1.orderer.example.com:7032 + EtcdRaft: + Consenters: + - Host: orderer0.group1.orderer.example.com + Port: 7030 + ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt + ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt + + - Host: orderer1.group1.orderer.example.com + Port: 7031 + ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/tls/server.crt + ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/tls/server.crt + + - Host: orderer2.group1.orderer.example.com + Port: 7032 + ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/tls/server.crt + ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/tls/server.crt + + BatchTimeout: 2s + BatchSize: + MaxMessageCount: 10 + AbsoluteMaxBytes: 99 MB + PreferredMaxBytes: 512 KB + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Orderer policies, their canonical path is + # /Channel/Orderer/ + Policies: + Readers: + Type: ImplicitMeta + Rule: \\"ANY Readers\\" + Writers: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Admins: + Type: ImplicitMeta + Rule: \\"MAJORITY Admins\\" + # BlockValidation specifies what signatures must be included in the block + # from the orderer for the peer to validate it. + BlockValidation: + Type: ImplicitMeta + Rule: \\"ANY Writers\\" + Capabilities: + <<: *OrdererCapabilities + +################################################################################ +# Profile +################################################################################ +# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml + +Profiles: + # Profile used to create Genesis block for group group1 # + Group1Genesis: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 + + # Profile used to create channeltx for my-channel1 # + MyChannel1: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 + + # Profile used to create channeltx for my-channel2 # + MyChannel2: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-orderer\\", + \\"description\\": \\"Connection profile for Orderer in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Orderer\\" + }, + \\"organizations\\": { + \\"Orderer\\": { + \\"mspid\\": \\"OrdererMSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\", + \\"peer1.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.orderer.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpcs://localhost:7041\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + } + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpcs://localhost:7042\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + } + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpcs://localhost:7061\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + } + }, + \\"peer1.org2.example.com\\": { + \\"url\\": \\"grpcs://localhost:7062\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + } + } + }, + \\"certificateAuthorities\\": { + \\"ca.orderer.example.com\\": { + \\"url\\": \\"https://localhost:7020\\", + \\"caName\\": \\"ca.orderer.example.com\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" + }, + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"name: fablo-test-network-orderer +description: Connection profile for Orderer in Fablo network +version: 1.0.0 +client: + organization: Orderer +organizations: + Orderer: + mspid: OrdererMSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + - peer1.org2.example.com + certificateAuthorities: + - ca.orderer.example.com +peers: + peer0.org1.example.com: + url: grpcs://localhost:7041 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer0.org1.example.com + peer1.org1.example.com: + url: grpcs://localhost:7042 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer1.org1.example.com + peer0.org2.example.com: + url: grpcs://localhost:7061 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer0.org2.example.com + peer1.org2.example.com: + url: grpcs://localhost:7062 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer1.org2.example.com +certificateAuthorities: + ca.orderer.example.com: + url: https://localhost:7020 + caName: ca.orderer.example.com + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-org1\\", + \\"description\\": \\"Connection profile for Org1 in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Org1\\" + }, + \\"organizations\\": { + \\"Org1\\": { + \\"mspid\\": \\"Org1MSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\", + \\"peer1.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.org1.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpcs://localhost:7041\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + } + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpcs://localhost:7042\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + } + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpcs://localhost:7061\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + } + }, + \\"peer1.org2.example.com\\": { + \\"url\\": \\"grpcs://localhost:7062\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + } + } + }, + \\"certificateAuthorities\\": { + \\"ca.org1.example.com\\": { + \\"url\\": \\"https://localhost:7040\\", + \\"caName\\": \\"ca.org1.example.com\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" + }, + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"name: fablo-test-network-org1 +description: Connection profile for Org1 in Fablo network +version: 1.0.0 +client: + organization: Org1 +organizations: + Org1: + mspid: Org1MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + - peer1.org2.example.com + certificateAuthorities: + - ca.org1.example.com +peers: + peer0.org1.example.com: + url: grpcs://localhost:7041 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer0.org1.example.com + peer1.org1.example.com: + url: grpcs://localhost:7042 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer1.org1.example.com + peer0.org2.example.com: + url: grpcs://localhost:7061 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer0.org2.example.com + peer1.org2.example.com: + url: grpcs://localhost:7062 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer1.org2.example.com +certificateAuthorities: + ca.org1.example.com: + url: https://localhost:7040 + caName: ca.org1.example.com + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"{ + \\"name\\": \\"fablo-test-network-org2\\", + \\"description\\": \\"Connection profile for Org2 in Fablo network\\", + \\"version\\": \\"1.0.0\\", + \\"client\\": { + \\"organization\\": \\"Org2\\" + }, + \\"organizations\\": { + \\"Org2\\": { + \\"mspid\\": \\"Org2MSP\\", + \\"peers\\": [ + \\"peer0.org1.example.com\\", + \\"peer1.org1.example.com\\", + \\"peer0.org2.example.com\\", + \\"peer1.org2.example.com\\" + ], + \\"certificateAuthorities\\": [ + \\"ca.org2.example.com\\" + ] + } + }, + \\"peers\\": { + \\"peer0.org1.example.com\\": { + \\"url\\": \\"grpcs://localhost:7041\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" + } + }, + \\"peer1.org1.example.com\\": { + \\"url\\": \\"grpcs://localhost:7042\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" + } + }, + \\"peer0.org2.example.com\\": { + \\"url\\": \\"grpcs://localhost:7061\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" + } + }, + \\"peer1.org2.example.com\\": { + \\"url\\": \\"grpcs://localhost:7062\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" + }, + \\"grpcOptions\\": { + \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" + } + } + }, + \\"certificateAuthorities\\": { + \\"ca.org2.example.com\\": { + \\"url\\": \\"https://localhost:7060\\", + \\"caName\\": \\"ca.org2.example.com\\", + \\"tlsCACerts\\": { + \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\" + }, + \\"httpOptions\\": { + \\"verify\\": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"name: fablo-test-network-org2 +description: Connection profile for Org2 in Fablo network +version: 1.0.0 +client: + organization: Org2 +organizations: + Org2: + mspid: Org2MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + - peer1.org2.example.com + certificateAuthorities: + - ca.org2.example.com +peers: + peer0.org1.example.com: + url: grpcs://localhost:7041 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer0.org1.example.com + peer1.org1.example.com: + url: grpcs://localhost:7042 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer1.org1.example.com + peer0.org2.example.com: + url: grpcs://localhost:7061 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer0.org2.example.com + peer1.org2.example.com: + url: grpcs://localhost:7062 + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt + grpcOptions: + ssl-target-name-override: peer1.org2.example.com +certificateAuthorities: + ca.org2.example.com: + url: https://localhost:7060 + caName: ca.org2.example.com + tlsCACerts: + path: >- + /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"PeerOrgs: + - Name: Orderer + Domain: orderer.example.com + Specs: + - Hostname: orderer0.group1 + - Hostname: orderer1.group1 + - Hostname: orderer2.group1 + Template: + Count: 0 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"PeerOrgs: + - Name: Org1 + Domain: org1.example.com + Specs: + Template: + Count: 2 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"PeerOrgs: + - Name: Org2 + Domain: org2.example.com + Specs: + Template: + Count: 2 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"{ + \\"network-configs\\": { + \\"network-org1\\": { + \\"name\\": \\"Network of Org1\\", + \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" + }, + \\"network-org2\\": { + \\"name\\": \\"Network of Org2\\", + \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" + } + }, + \\"license\\": \\"Apache-2.0\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + orderer: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org1: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" +# To set the \\"keyfile\\" element in the \\"ca\\" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with \\"file\\" or \\"files\\" are +# name or names of other files. +# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - \\"*\\" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if \\"ldap.enabled\\" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if \\"ldap.enabled\\" in the ldap section below is true, +# which means this \\"registry\\" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: \\"\\" + attrs: + hf.Registrar.Roles: \\"*\\" + hf.Registrar.DelegateRoles: \\"*\\" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: \\"*\\" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". +# The datasource value depends on the type. +# If the type is \\"sqlite3\\", the datasource value is a file name to use +# as the database store. Since \\"sqlite3\\" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" +# or \\"mysql\\". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the \\"registry\\" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr(\\"uid\\") =~ \\"revoker*\\" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr(\\"member\\"),\\"groups\\") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is + # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of + # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org2: + +############################################################################# +# Signing section +# +# The \\"default\\" subsection is used to sign enrollment certificates; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +# +# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; +# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. +# Note that \\"isca\\" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The \\"tls\\" profile subsection is used to sign TLS certificate requests; +# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: \\"North Carolina\\" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the \\"Multi CA section\\" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the \\"intermediate.parentserver.url\\" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash + +set -eu + +FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" + +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" +source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" + +networkUp() { + generateArtifacts + startNetwork + generateChannelsArtifacts + installChannels + installChaincodes + notifyOrgsAboutChannels + printStartSuccessInfo +} + +if [ \\"$1\\" = \\"up\\" ]; then + networkUp +elif [ \\"$1\\" = \\"down\\" ]; then + networkDown +elif [ \\"$1\\" = \\"reset\\" ]; then + networkDown + networkUp +elif [ \\"$1\\" = \\"start\\" ]; then + startNetwork +elif [ \\"$1\\" = \\"stop\\" ]; then + stopNetwork +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then + installChaincodes +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then + installChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then + upgradeChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then + runDevModeChaincode \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then + chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" +elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then + chaincodeList \\"$3\\" \\"$4\\" +elif [ \\"$1\\" = \\"channel\\" ]; then + channelQuery \\"\${@:2}\\" +elif [ \\"$1\\" = \\"snapshot\\" ]; then + createSnapshot \\"$2\\" +elif [ \\"$1\\" = \\"clone-to\\" ]; then + cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" +elif [ \\"$1\\" = \\"help\\" ]; then + printHelp +elif [ \\"$1\\" = \\"--help\\" ]; then + printHelp +else + echo \\"No command specified\\" + echo \\"Basic commands are: up, down, start, stop, reset\\" + echo \\"To list channel query helper commands type: 'fablo channel --help'\\" + echo \\"Also check: 'chaincode install'\\" + echo \\"Use 'help' or '--help' for more information\\" +fi +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"FABLO_VERSION=1.2.1-unstable.0 +FABLO_BUILD= +FABLO_REST_VERSION=0.1.0 +HYPERLEDGER_EXPLORER_VERSION=1.1.8 + +COUCHDB_VERSION=3.1 +FABRIC_COUCHDB_VERSION=0.4.18 + +FABLO_CONFIG= +CHAINCODES_BASE_DIR= + +COMPOSE_PROJECT_NAME= +LOGGING_LEVEL=info + +FABRIC_VERSION=1.4.6 +FABRIC_CA_VERSION=1.4.6 +FABRIC_CA_POSTGRES_VERSION=14 +FABRIC_CCENV_VERSION=1.4.6 +FABRIC_BASEOS_VERSION=0.4.9 +FABRIC_JAVAENV_VERSION=1.4 +FABRIC_NODEENV_VERSION=1.4 +RECOMMENDED_NODE_VERSION=12 + +ROOT_CA_ADMIN_NAME=admin +ROOT_CA_ADMIN_PASSWORD=adminpw + +ORDERER_CA_ADMIN_NAME=admin +ORDERER_CA_ADMIN_PASSWORD=adminpw + +ORG1_CA_ADMIN_NAME=admin +ORG1_CA_ADMIN_PASSWORD=adminpw + +ORG2_CA_ADMIN_NAME=admin +ORG2_CA_ADMIN_PASSWORD=adminpw + +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash + +chaincodeList() { + if [ \\"$#\\" -ne 2 ]; then + echo \\"Expected 2 parameters for chaincode list, but got: $*\\" + exit 1 + + elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org1.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer0.org2.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + elif + [ \\"$1\\" = \\"peer1.org2.example.com\\" ] + then + + peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name + + else + + echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" + exit 1 + + fi +} + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then + echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" + echo \\"Usage: fablo chaincode invoke [transient]\\" + exit 1 + fi + cli=\\"\\" + peer_addresses=\\"\\" + + peer_certs=\\"\\" + + if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then + cli=\\"cli.org1.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" + + fi + if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then + cli=\\"cli.org2.example.com\\" + peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" + + peer_certs=\\"$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt\\" + + fi + if [ -z \\"$peer_addresses\\" ]; then + echo \\"Unknown peers: $1\\" + exit 1 + fi + + if [ \\"$2\\" = \\"my-channel1\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + fi + + if [ \\"$2\\" = \\"my-channel2\\" ]; then + ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + fi + + peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" + +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash + +source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" + +set -eu + +channelQuery() { + echo \\"-> Channel query: \\" + \\"$@\\" + + if [ \\"$#\\" -eq 1 ]; then + printChannelsHelp + + elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then + + peerChannelListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] + then + + peerChannelListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] + then + + peerChannelListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif + [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer1\\" ] + then + + peerChannelListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif + + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] + then + + peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] + then + + peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] + then + + peerChannelGetInfoTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfigTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlockTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + + elif + [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer1\\" ] + then + + peerChannelGetInfoTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + TARGET_FILE=\${6:-\\"$channel-config.json\\"} + + peerChannelFetchConfigTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} + + peerChannelFetchBlockTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" + + else + + echo \\"$@\\" + echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" + printChannelsHelp + fi + +} + +printChannelsHelp() { + echo \\"Channel management commands:\\" + echo \\"\\" + + echo \\"fablo channel list org1 peer0\\" + echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel list org1 peer1\\" + echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel list org2 peer0\\" + echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". + echo \\"\\" + + echo \\"fablo channel list org2 peer1\\" + echo -e \\"\\\\t List channels on 'peer1' of 'Org2'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org1 peer0\\" + echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel1 org2 peer0\\" + echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel2 org1 peer1\\" + echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel2 org1 peer1 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel2 org1 peer1 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". + echo \\"\\" + + echo \\"fablo channel getinfo my-channel2 org2 peer1\\" + echo -e \\"\\\\t Get channel info on 'peer1' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch config my-channel2 org2 peer1 [file-name.json]\\" + echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'\\". + echo \\"\\" + echo \\"fablo channel fetch my-channel2 org2 peer1 [file name]\\" + echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'\\". + echo \\"\\" + +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash + +generateArtifacts() { + printHeadline \\"Generating basic configs\\" \\"U1F913\\" + + printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" + certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" + + printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" + genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" + + # Create directory for chaincode packages to avoid permission errors on linux + mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" +} + +startNetwork() { + printHeadline \\"Starting network\\" \\"U1F680\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) + sleep 4 +} + +generateChannelsArtifacts() { + printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" + createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + printHeadline \\"Generating config for 'my-channel2'\\" \\"U1F913\\" + createChannelTx \\"my-channel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" +} + +installChannels() { + printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" + docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + + printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" + docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + printHeadline \\"Creating 'my-channel2' on Org1/peer1\\" \\"U1F63B\\" + docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" + + printItalics \\"Joining 'my-channel2' on Org2/peer1\\" \\"U1F638\\" + docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" +} + +installChaincodes() { + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + else + echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then + chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" \\"12\\" + printHeadline \\"Installing 'chaincode2' on my-channel2/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline \\"Installing 'chaincode2' on my-channel2/Org2/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printItalics \\"Instantiating chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + else + echo \\"Warning! Skipping chaincode 'chaincode2' installation. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" + fi + +} + +installChaincode() { + local chaincodeName=\\"$1\\" + if [ -z \\"$chaincodeName\\" ]; then + echo \\"Error: chaincode name is not provided\\" + exit 1 + fi + + local version=\\"$2\\" + if [ -z \\"$version\\" ]; then + echo \\"Error: chaincode version is not provided\\" + exit 1 + fi + + if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + + else + echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi + if [ \\"$chaincodeName\\" = \\"chaincode2\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then + chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" \\"12\\" + printHeadline \\"Installing 'chaincode2' on my-channel2/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printHeadline \\"Installing 'chaincode2' on my-channel2/Org2/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printItalics \\"Instantiating chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'\\" \\"U1F618\\" + chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + + else + echo \\"Warning! Skipping chaincode 'chaincode2' install. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" + fi + fi +} + +runDevModeChaincode() { + echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" + exit 1 +} + +upgradeChaincode() { + local chaincodeName=\\"$1\\" + if [ -z \\"$chaincodeName\\" ]; then + echo \\"Error: chaincode name is not provided\\" + exit 1 + fi + + local version=\\"$2\\" + if [ -z \\"$version\\" ]; then + echo \\"Error: chaincode version is not provided\\" + exit 1 + fi + + if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then + chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" + + printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" + chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + + else + echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" + fi + fi + if [ \\"$chaincodeName\\" = \\"chaincode2\\" ]; then + if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then + chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" + + printHeadline \\"Installing 'chaincode2' on my-channel2/Org1/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + printHeadline \\"Installing 'chaincode2' on my-channel2/Org2/peer1\\" \\"U1F60E\\" + chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + printItalics \\"Upgrading as 'Org1'. 'chaincode2' on channel 'my-channel2'\\" \\"U1F618\\" + chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" + + else + echo \\"Warning! Skipping chaincode 'chaincode2' upgrade. Chaincode directory is empty.\\" + echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" + fi + fi +} + +notifyOrgsAboutChannels() { + printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" + createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + createNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + createNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + + printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" + notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + notifyOrgAboutNewChannelTls \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + notifyOrgAboutNewChannelTls \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" + + printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" + deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" + deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" + deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" + deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" +} + +printStartSuccessInfo() { + printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" +} + +stopNetwork() { + printHeadline \\"Stopping network\\" \\"U1F68F\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) + sleep 4 +} + +networkDown() { + printHeadline \\"Destroying network\\" \\"U1F916\\" + (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) + + printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" + for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-chaincode1\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer0.org2.example.com-chaincode1*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode2\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer1.org1.example.com-chaincode2*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + for container in $(docker ps -a | grep \\"dev-peer1.org2.example.com-chaincode2\\" | awk '{print $1}'); do + echo \\"Removing container $container...\\" + docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" + done + for image in $(docker images \\"dev-peer1.org2.example.com-chaincode2*\\" -q); do + echo \\"Removing image $image...\\" + docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" + done + + printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" + rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" + + printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"version: '2.2' + +networks: + basic: + +services: + + ca.orderer.example.com: + container_name: ca.orderer.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - FABRIC_CA_SERVER_TLS_ENABLED=true + ports: + - 7020:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.orderer.example.com: + container_name: cli.orderer.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.orderer.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=OrdererMSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.crt + - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.key + - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/ca.crt + - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" + networks: + - basic + + orderer0.group1.orderer.example.com: + container_name: orderer0.group1.orderer.example.com + image: hyperledger/fabric-orderer:\${FABRIC_VERSION} + environment: + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 + - ORDERER_GENERAL_LISTENPORT=7030 + - ORDERER_GENERAL_GENESISMETHOD=file + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block + - ORDERER_GENERAL_LOCALMSPID=OrdererMSP + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp + - GODEBUG=netdns=go + # metrics + - ORDERER_OPERATIONS_LISTENADDRESS=orderer0.group1.orderer.example.com:9440 + - ORDERER_METRICS_PROVIDER=prometheus + # enabled TLS + - ORDERER_GENERAL_TLS_ENABLED=true + - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key + - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt + - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] + - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt + - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key + - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] + working_dir: /var/hyperledger/orderer + command: orderer + ports: + - 7030:7030 + - 8030:9440 + volumes: + - ../fabric-config/config/:/var/hyperledger/config + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls + networks: + - basic + + orderer1.group1.orderer.example.com: + container_name: orderer1.group1.orderer.example.com + image: hyperledger/fabric-orderer:\${FABRIC_VERSION} + environment: + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 + - ORDERER_GENERAL_LISTENPORT=7031 + - ORDERER_GENERAL_GENESISMETHOD=file + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block + - ORDERER_GENERAL_LOCALMSPID=OrdererMSP + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp + - GODEBUG=netdns=go + # metrics + - ORDERER_OPERATIONS_LISTENADDRESS=orderer1.group1.orderer.example.com:9440 + - ORDERER_METRICS_PROVIDER=prometheus + # enabled TLS + - ORDERER_GENERAL_TLS_ENABLED=true + - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key + - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt + - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] + - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt + - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key + - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] + working_dir: /var/hyperledger/orderer + command: orderer + ports: + - 7031:7031 + - 8031:9440 + volumes: + - ../fabric-config/config/:/var/hyperledger/config + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls + networks: + - basic + + orderer2.group1.orderer.example.com: + container_name: orderer2.group1.orderer.example.com + image: hyperledger/fabric-orderer:\${FABRIC_VERSION} + environment: + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 + - ORDERER_GENERAL_LISTENPORT=7032 + - ORDERER_GENERAL_GENESISMETHOD=file + - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block + - ORDERER_GENERAL_LOCALMSPID=OrdererMSP + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp + - GODEBUG=netdns=go + # metrics + - ORDERER_OPERATIONS_LISTENADDRESS=orderer2.group1.orderer.example.com:9440 + - ORDERER_METRICS_PROVIDER=prometheus + # enabled TLS + - ORDERER_GENERAL_TLS_ENABLED=true + - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key + - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt + - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] + - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt + - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key + - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] + working_dir: /var/hyperledger/orderer + command: orderer + ports: + - 7032:7032 + - 8032:9440 + volumes: + - ../fabric-config/config/:/var/hyperledger/config + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls + networks: + - basic + + ca.org1.example.com: + container_name: ca.org1.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - FABRIC_CA_SERVER_TLS_ENABLED=true + ports: + - 7040:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org1.example.com: + container_name: cli.org1.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org1.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.crt + - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.key + - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/ca.crt + - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" + networks: + - basic + + peer0.org1.example.com: + container_name: peer0.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer0.org1.example.com + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt + - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key + - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8041:9440 + - 7041:7041 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + peer1.org1.example.com: + container_name: peer1.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer1.org1.example.com + - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt + - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key + - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8042:9440 + - 7042:7042 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + + ca.org2.example.com: + container_name: ca.org2.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - FABRIC_CA_SERVER_TLS_ENABLED=true + ports: + - 7060:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org2.example.com: + container_name: cli.org2.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org2.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp + - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/tls/client.crt + - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/tls/client.key + - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/tls/ca.crt + - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" + - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" + networks: + - basic + + peer0.org2.example.com: + container_name: peer0.org2.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_ID=peer0.org2.example.com + - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 + - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt + - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key + - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8061:9440 + - 7061:7061 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + peer1.org2.example.com: + container_name: peer1.org2.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_ID=peer1.org2.example.com + - CORE_PEER_ADDRESS=peer1.org2.example.com:7062 + - CORE_PEER_LISTENADDRESS=peer1.org2.example.com:7062 + - CORE_PEER_GOSSIP_ENDPOINT=peer1.org2.example.com:7062 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7062 + - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" + - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer1.org2.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + # enabled TLS + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt + - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key + - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8062:9440 + - 7062:7062 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash + +certsGenerate() { + local CONTAINER_NAME=certsGenerate + + local CONFIG_PATH=$1 + local CRYPTO_CONFIG_FILE_NAME=$2 + local ORG_PATH=$3 + local OUTPUT_PATH=$4 + local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH + + echo \\"Generating certs...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" + inputLog \\"ORG_PATH: $ORG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" + + if [ -d \\"$FULL_CERT_PATH\\" ]; then + echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME + + # shellcheck disable=2044 + for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do + dir=$(dirname \\"$file\\") + mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem + done +} + +genesisBlockCreate() { + local CONTAINER_NAME=genesisBlockCreate + + local CONFIG_PATH=$1 + local OUTPUT_PATH=$2 + local GENESIS_PROFILE_NAME=$3 + local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block + + echo \\"Creating genesis block...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" + inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" + + if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then + echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME + + mkdir -p \\"$OUTPUT_PATH\\" + docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createChannelTx() { + local CONTAINER_NAME=createChannelTx + + local CHANNEL_NAME=$1 + local CONFIG_PATH=$2 + local CONFIG_PROFILE=$3 + local OUTPUT_PATH=$4 + local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx + + echo \\"Creating channelTx for $CHANNEL_NAME...\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" + + if [ -f \\"$CHANNEL_TX_PATH\\" ]; then + echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createNewChannelUpdateTx() { + local CONTAINER_NAME=createAnchorPeerUpdateTx + + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CONFIG_PROFILE=$3 + local CONFIG_PATH=$4 + local OUTPUT_PATH=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" + inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" + inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" + echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" + exit 1 + fi + + docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME + docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\\\ + --configPath ./fabric-config \\\\ + -profile \\"\${CONFIG_PROFILE}\\" \\\\ + -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ + -channelID \\"\${CHANNEL_NAME}\\" \\\\ + -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +notifyOrgAboutNewChannel() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel update \\\\ + -c \\"$CHANNEL_NAME\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -f \\"$ANCHOR_PEER_UPDATE_PATH\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +notifyOrgAboutNewChannelTls() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} + + echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"MSP_NAME: $MSP_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel update \\\\ + -c \\"$CHANNEL_NAME\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ + --tls --cafile \\"$CA_CERT\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +deleteNewChannelUpdateTx() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" + + echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" + inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" + + if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then + docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" + else + echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" + fi +} + +printHeadline() { + bold=$'\\\\e[1m' + end=$'\\\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" +} + +printItalics() { + italics=$'\\\\e[3m' + end=$'\\\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" +} + +inputLog() { + end=$'\\\\e[0m' + darkGray=$'\\\\e[90m' + + echo \\"\${darkGray} $1 \${end}\\" +} + +inputLogShort() { + end=$'\\\\e[0m' + darkGray=$'\\\\e[90m' + + echo \\"\${darkGray} $1 \${end}\\" +} + +certsRemove() { + local CERTS_DIR_PATH=$1 + rm -rf \\"$CERTS_DIR_PATH\\" +} + +removeContainer() { + CONTAINER_NAME=$1 + docker rm -f \\"$CONTAINER_NAME\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash + +printHelp() { + echo \\"Fablo is powered by SoftwareMill\\" + + echo \\"\\" + echo \\"usage: ./fabric-docker.sh \\" + echo \\"\\" + + echo \\"Commands: \\" + echo \\"\\" + echo \\"./fabric-docker.sh up\\" + echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" + echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" + echo \\"\\" + echo \\"./fabric-docker.sh down\\" + echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" + echo \\"\\" + echo \\"./fabric-docker.sh start\\" + echo -e \\"\\\\t Starts already created network.\\" + echo \\"\\" + echo \\"./fabric-docker.sh stop\\" + echo -e \\"\\\\t Stops already running network.\\" + echo \\"\\" + echo \\"./fabric-docker.sh reset\\" + echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" + echo \\"\\" + echo \\"./fabric-docker.sh channel --help\\" + echo -e \\"\\\\t Detailed help for channel management scripts.\\" + echo \\"\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash +# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. +# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u + +dockerPullIfMissing() { + local IMAGE=\\"$1\\" + if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then + docker pull --platform linux/x86_64 \\"$IMAGE\\" + fi +} + +chaincodeBuild() { + local CHAINCODE_NAME=$1 + local CHAINCODE_LANG=$2 + local CHAINCODE_DIR_PATH=$3 + local RECOMMENDED_NODE_VERSION=$4 + + mkdir -p \\"$CHAINCODE_DIR_PATH\\" + + # pull required images upfront in case of arm64 (Apple Silicon) architecture + # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu + if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" + fi + if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" + fi + if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then + dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" + fi + fi + + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then + # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) + set +e + source ~/.nvm/nvm.sh + set -e + if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then + current_dir=\\"$(pwd)\\" + cd \\"$CHAINCODE_DIR_PATH\\" + set +u + nvm install + set -u + cd \\"$current_dir\\" + fi + fi + + NODE_VERSION=\\"$(node --version)\\" + + USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" + if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then + RECOMMENDED_NODE_VERSION=\\"8.9\\" + fi + + if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then + echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" + echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" + fi + + echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" + inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + #!/bin/bash + + if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then + echo \\"yarn not supported, installing using npm instead\\" + fi + + # Default to using npm for installation and build + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + + fi + +} + +chaincodeInstall() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local CA_CERT=$8 + + echo \\"Installing chaincode on $CHANNEL_NAME...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} + +chaincodeInstantiate() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local INIT_PARAMS=$8 + local ENDORSEMENT=$9 + local CA_CERT=\${10} + local COLLECTIONS_CONFIG=\${11} + + echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" + inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ + -C \\"$CHANNEL_NAME\\" \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -c \\"$INIT_PARAMS\\" \\\\ + -P \\"$ENDORSEMENT\\" \\\\ + \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} + +chaincodeUpgrade() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LANG=$6 + local ORDERER_URL=$7 + local INIT_PARAMS=$8 + local ENDORSEMENT=$9 + local CA_CERT=\${10} + local COLLECTIONS_CONFIG=\${11} + + echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" + inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" + inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"ORDERER_URL: $ORDERER_URL\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CA_CERT: $CA_CERT\\" + + local CA_CERT_PARAMS=() + if [ -n \\"$CA_CERT\\" ]; then + CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") + fi + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ + -C \\"$CHANNEL_NAME\\" \\\\ + -n \\"$CHAINCODE_NAME\\" \\\\ + -v \\"$CHAINCODE_VERSION\\" \\\\ + -l \\"$CHAINCODE_LANG\\" \\\\ + -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ + -o \\"$ORDERER_URL\\" \\\\ + -c \\"$INIT_PARAMS\\" \\\\ + -P \\"$ENDORSEMENT\\" \\\\ + \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ + \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash + +peerChannelList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + + echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list +} + +peerChannelGetInfo() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + + echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ + -c \\"$CHANNEL_NAME\\" +} + +peerChannelFetchConfig() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + + echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ + -c \\"$CHANNEL_NAME\\" + + docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" configtxlator proto_decode \\\\ + --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + --type common.Block | + jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlock() { + local CHANNEL_NAME=\\"$1\\" + local CLI_NAME=\\"$2\\" + local BLOCK_NAME=\\"$3\\" + local PEER_ADDRESS=\\"$4\\" + local TARGET_FILE=\\"$5\\" + local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + + echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"TARGET_FILE: $TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ + -c \\"$CHANNEL_NAME\\" + + docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ +} + +#=== TLS equivalents ========================================================= + +peerChannelListTls() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CA_CERT=$3 + + echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" +} + +peerChannelGetInfoTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + local CA_CERT=$4 + + echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" +} + +peerChannelFetchConfigTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + local CA_CERT=$5 + + echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + + docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\\\ + -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" configtxlator proto_decode \\\\ + --input /tmp/hyperledger/assets/config_block_before.pb \\\\ + --type common.Block | + jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlockTls() { + local CHANNEL_NAME=\\"$1\\" + local CLI_NAME=\\"$2\\" + local BLOCK_NAME=\\"$3\\" + local PEER_ADDRESS=\\"$4\\" + local CA_CERT=\\"$5\\" + local TARGET_FILE=\\"$6\\" + local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" + + echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" + inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" + inputLog \\"CLI_NAME: $CLI_NAME\\" + inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" + inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" + inputLog \\"TARGET_FILE: $TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ + \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ + -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" + + docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" + + docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash + +set -eu + +createChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + + local ORDERER_URL=$5 + + local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Creating channel with name: \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + + peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx + peer channel join -b \\"\${CHANNEL_NAME}\\".block + + rm -rf \\"$DIR_NAME\\" +} + +createChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") + local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" + echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" + echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" + echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . + + peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + + rm -rf \\"$DIR_NAME\\" +} + +fetchChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + + local ORDERER_URL=$5 + + local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" + peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block + + rm -rf \\"$DIR_NAME\\" +} + +fetchChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") + local TLS_CA_CERT_PATH=$(realpath \\"$6\\") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" + echo \\" Orderer: $ORDERER_URL\\" + echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" + echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" + echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" + echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" + echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" + echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" + echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" + + mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" + + peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" + peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" + + rm -rf \\"$DIR_NAME\\" +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash + +__getOrdererAndPeerNodes() { + echo \\" + orderer0.group1.orderer.example.com + orderer1.group1.orderer.example.com + orderer2.group1.orderer.example.com + peer0.org1.example.com + peer1.org1.example.com + peer0.org2.example.com + peer1.org2.example.com + \\" +} + +__getCASQLiteNodes() { + echo \\" + ca.orderer.example.com + ca.org1.example.com + ca.org2.example.com + \\" +} + +__getCAPostgresNodes() { + echo \\" + \\" +} + +__createSnapshot() { + cd \\"$FABLO_NETWORK_ROOT/..\\" + backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" + + if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then + echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" + exit 1 + fi + + mkdir -p \\"$backup_dir\\" + cp -R ./fablo-target \\"$backup_dir/\\" + + for node in $(__getCASQLiteNodes); do + echo \\"Saving state of $node...\\" + mkdir -p \\"$backup_dir/$node\\" + docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" + done + + for node in $(__getCAPostgresNodes); do + echo \\"Saving state of $node...\\" + mkdir -p \\"$backup_dir/$node/pg-data\\" + docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" + done + + for node in $(__getOrdererAndPeerNodes); do + echo \\"Saving state of $node...\\" + docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" + done +} + +__cloneSnapshot() { + cd \\"$FABLO_NETWORK_ROOT/..\\" + target_dir=\\"$1\\" + hook_cmd=\\"$2\\" + + if [ -d \\"$target_dir/fablo-target\\" ]; then + echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" + exit 1 + fi + + cp -R ./fablo-target \\"$target_dir/fablo-target\\" + + if [ -n \\"$hook_cmd\\" ]; then + echo \\"Executing pre-restore hook: '$hook_cmd'\\" + (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") + fi + + (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) + + for node in $(__getCASQLiteNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" + fi + done + + for node in $(__getCAPostgresNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" + fi + done + + for node in $(__getOrdererAndPeerNodes); do + echo \\"Restoring $node...\\" + if [ ! -d \\"$node\\" ]; then + echo \\"Warning: Cannot restore '$node', directory does not exist!\\" + else + docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" + fi + done +} + +createSnapshot() { + (set -eu && __createSnapshot \\"$1\\") +} + +cloneSnapshot() { + (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") +} +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +"#!/usr/bin/env bash + +# The code from this file was called after Fablo generated Hyperledger Fabric configuration +echo \\"Executing post-generate hook\\" +" +`; + +exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper files from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` +Array [ + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/.gitignore", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/.env", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/hooks/post-generate.sh", +] +`; From e98d51afba056950a93123def86504c192227cc3 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Sun, 23 Jun 2024 21:16:42 +0530 Subject: [PATCH 61/83] drop yarn and nvm support for v2 also Signed-off-by: Sanket Teli --- .../scripts/chaincode-functions-v1.4.sh | 15 ----------- .../scripts/chaincode-functions-v2.sh | 25 +++++-------------- 2 files changed, 6 insertions(+), 34 deletions(-) diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh index abe3806a..51e5051b 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh @@ -32,21 +32,6 @@ chaincodeBuild() { fi if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: `source ~/.nvm/nvm.sh || true` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" - set +u - nvm install - set -u - cd "$current_dir" - fi - fi - NODE_VERSION="$(node --version)" USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index ac9ac93e..afbd7c0d 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -32,21 +32,7 @@ chaincodeBuild() { fi if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: `source ~/.nvm/nvm.sh || true` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" - set +u - nvm install - set -u - cd "$current_dir" - fi - fi - + NODE_VERSION="$(node --version)" USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" @@ -65,12 +51,13 @@ chaincodeBuild() { inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - # We have different commands for npm and yarn if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) - else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build && npm install --production) + echo "yarn not supported, installing using npm instead" fi + + # Default to using npm for installation and build + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) + fi } From f866ffe9b936094f872832c9b5dc35b4f73b066d Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Sun, 23 Jun 2024 21:21:17 +0530 Subject: [PATCH 62/83] added the snapshots for the changes Signed-off-by: Sanket Teli --- ...-1chaincode-private-data.json.test.ts.snap | 15 ------------- ...1.4-1org-1chaincode-raft.json.test.ts.snap | 15 ------------- ...-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 15 ------------- ...2chaincodes-private-data.yaml.test.ts.snap | 15 ------------- ...4-2orgs-2chaincodes-raft.json.test.ts.snap | 15 ------------- ...1chaincode-raft-explorer.json.test.ts.snap | 18 +++++++-------- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 22 ++++--------------- ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 22 ++++--------------- ...1chaincode-raft-explorer.json.test.ts.snap | 22 ++++--------------- 9 files changed, 21 insertions(+), 138 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index 333fe5c1..f39d4b1e 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -3161,21 +3161,6 @@ chaincodeBuild() { fi if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" - set +u - nvm install - set -u - cd \\"$current_dir\\" - fi - fi - NODE_VERSION=\\"$(node --version)\\" USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index 18e71908..eab750b4 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -2459,21 +2459,6 @@ chaincodeBuild() { fi if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" - set +u - nvm install - set -u - cd \\"$current_dir\\" - fi - fi - NODE_VERSION=\\"$(node --version)\\" USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index 02f04ac8..1651dfb9 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -3269,21 +3269,6 @@ chaincodeBuild() { fi if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" - set +u - nvm install - set -u - cd \\"$current_dir\\" - fi - fi - NODE_VERSION=\\"$(node --version)\\" USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index c7f95580..58d842c7 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -3249,21 +3249,6 @@ chaincodeBuild() { fi if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" - set +u - nvm install - set -u - cd \\"$current_dir\\" - fi - fi - NODE_VERSION=\\"$(node --version)\\" USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index 07ad0450..52b23dd4 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -3658,21 +3658,6 @@ chaincodeBuild() { fi if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" - set +u - nvm install - set -u - cd \\"$current_dir\\" - fi - fi - NODE_VERSION=\\"$(node --version)\\" USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index ff301af3..3829c300 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -2498,19 +2498,19 @@ chaincodeBuild() { fi fi - if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) set +e source ~/.nvm/nvm.sh set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" + if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then + current_dir=\\"$(pwd)\\" + cd \\"$CHAINCODE_DIR_PATH\\" set +u nvm install set -u - cd "$current_dir" + cd \\"$current_dir\\" fi fi @@ -2533,10 +2533,10 @@ chaincodeBuild() { inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) + if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build && npm install --production) + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) fi fi } diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 55160a19..41ac887c 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -2362,21 +2362,7 @@ chaincodeBuild() { fi fi - if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" - set +u - nvm install - set -u - cd "$current_dir" - fi - fi + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then NODE_VERSION="$(node --version)" @@ -2397,10 +2383,10 @@ chaincodeBuild() { inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) + if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build && npm install --production) + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) fi fi } diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 2c891307..858d4ee5 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -4698,21 +4698,7 @@ chaincodeBuild() { fi fi - if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" - set +u - nvm install - set -u - cd "$current_dir" - fi - fi + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then NODE_VERSION="$(node --version)" @@ -4733,10 +4719,10 @@ chaincodeBuild() { inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) + if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build && npm install --production) + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) fi fi } diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 0604d508..c03aaad9 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -5204,21 +5204,7 @@ chaincodeBuild() { fi fi - if [ "$CHAINCODE_LANG" = "node" ]; then - if [ "$(command -v nvm)" != "nvm" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ "$(command -v nvm)" == "nvm" ]; then - current_dir="$(pwd)" - cd "$CHAINCODE_DIR_PATH" - set +u - nvm install - set -u - cd "$current_dir" - fi - fi + if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then NODE_VERSION="$(node --version)" @@ -5239,10 +5225,10 @@ chaincodeBuild() { inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # We have different commands for npm and yarn - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - (cd "$CHAINCODE_DIR_PATH" && npm install -g yarn && yarn install && yarn build) + if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) else - (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build && npm install --production) + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) fi fi } From 7d674401e26a7b54367b18256528f996e497a99c Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Sun, 7 Jul 2024 23:40:22 +0530 Subject: [PATCH 63/83] did the required changes, updated the snapshots Signed-off-by: Sanket Teli --- ...-1chaincode-private-data.json.test.ts.snap | 5 ----- ...1.4-1org-1chaincode-raft.json.test.ts.snap | 5 ----- ...-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 5 ----- ...2chaincodes-private-data.yaml.test.ts.snap | 5 ----- ...4-2orgs-2chaincodes-raft.json.test.ts.snap | 5 ----- ...1chaincode-raft-explorer.json.test.ts.snap | 21 ++++++++----------- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 21 ++++++++----------- ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 21 ++++++++----------- ...1chaincode-raft-explorer.json.test.ts.snap | 21 ++++++++----------- .../scripts/chaincode-functions-v1.4.sh | 4 ---- .../scripts/chaincode-functions-v2.sh | 4 ---- 11 files changed, 36 insertions(+), 81 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap index f39d4b1e..fefaccc7 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap @@ -3178,11 +3178,6 @@ chaincodeBuild() { inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" - #!/bin/bash - - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - echo \\"yarn not supported, installing using npm instead\\" - fi # Default to using npm for installation and build (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap index eab750b4..848a7124 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap @@ -2476,11 +2476,6 @@ chaincodeBuild() { inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" - #!/bin/bash - - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - echo \\"yarn not supported, installing using npm instead\\" - fi # Default to using npm for installation and build (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap index 1651dfb9..ba269a03 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap @@ -3286,11 +3286,6 @@ chaincodeBuild() { inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" - #!/bin/bash - - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - echo \\"yarn not supported, installing using npm instead\\" - fi # Default to using npm for installation and build (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap index 58d842c7..f4882278 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -3266,11 +3266,6 @@ chaincodeBuild() { inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" - #!/bin/bash - - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - echo \\"yarn not supported, installing using npm instead\\" - fi # Default to using npm for installation and build (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap index 52b23dd4..04dd4d04 100644 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap @@ -3675,11 +3675,6 @@ chaincodeBuild() { inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" - #!/bin/bash - - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - echo \\"yarn not supported, installing using npm instead\\" - fi # Default to using npm for installation and build (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 3829c300..6d82629f 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -2526,18 +2526,15 @@ chaincodeBuild() { echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo "Buiding chaincode '$CHAINCODE_NAME'..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" - inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - - # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) - else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) - fi + echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" + inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + + # Default to using npm for installation and build + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + fi } diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 41ac887c..5f1f0edb 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -2376,18 +2376,15 @@ chaincodeBuild() { echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo "Buiding chaincode '$CHAINCODE_NAME'..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" - inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - - # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) - else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) - fi + echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" + inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + + # Default to using npm for installation and build + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + fi } diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 858d4ee5..49f8c446 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -4712,18 +4712,15 @@ chaincodeBuild() { echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo "Buiding chaincode '$CHAINCODE_NAME'..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" - inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - - # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) - else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) - fi + echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" + inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + + # Default to using npm for installation and build + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + fi } diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index c03aaad9..ae5c3a03 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -5218,18 +5218,15 @@ chaincodeBuild() { echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo "Buiding chaincode '$CHAINCODE_NAME'..." - inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" - inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" - inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" - inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - - # We have different commands for npm and yarn - if [ -f \\"$CHAINCODE_DIR_PATH/yarn.lock\\" ]; then - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install -g yarn && yarn install && yarn build) - else - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) - fi + echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" + inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" + inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" + inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" + inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + + # Default to using npm for installation and build + (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + fi } diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh index 51e5051b..bda0be7a 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v1.4.sh @@ -49,11 +49,7 @@ chaincodeBuild() { inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - #!/bin/bash - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - echo "yarn not supported, installing using npm instead" - fi # Default to using npm for installation and build (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) diff --git a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh index afbd7c0d..168ddc01 100644 --- a/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh +++ b/src/setup-docker/templates/fabric-docker/scripts/chaincode-functions-v2.sh @@ -50,10 +50,6 @@ chaincodeBuild() { inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" - - if [ -f "$CHAINCODE_DIR_PATH/yarn.lock" ]; then - echo "yarn not supported, installing using npm instead" - fi # Default to using npm for installation and build (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) From f105362e51347097a46bc907f9c69609e44e6821 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Fri, 19 Jul 2024 20:24:17 +0530 Subject: [PATCH 64/83] updated the snapshots Signed-off-by: Sanket Teli --- ...-1chaincode-private-data.json.test.ts.snap | 3775 --------------- ...1.4-1org-1chaincode-raft.json.test.ts.snap | 3066 ------------ ...-hlf1.4-2orgs-1chaincode.json.test.ts.snap | 3883 --------------- ...2chaincodes-private-data.yaml.test.ts.snap | 3864 --------------- ...4-2orgs-2chaincodes-raft.json.test.ts.snap | 4274 ----------------- ...1chaincode-raft-explorer.json.test.ts.snap | 28 +- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 14 +- ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 14 +- ...1chaincode-raft-explorer.json.test.ts.snap | 14 +- 9 files changed, 28 insertions(+), 18904 deletions(-) delete mode 100644 e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap delete mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap delete mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap delete mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap delete mode 100644 e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap diff --git a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap deleted file mode 100644 index fefaccc7..00000000 --- a/e2e/__snapshots__/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.test.ts.snap +++ /dev/null @@ -1,3775 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"/config -/crypto-config -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/collections/chaincode1.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"[ - { - \\"name\\": \\"org1-collection\\", - \\"policy\\": \\"OR('Org1MSP.member')\\", - \\"requiredPeerCount\\": 1, - \\"maxPeerCount\\": 3, - \\"blockToLive\\": 0 - }, - { - \\"name\\": \\"org2-collection\\", - \\"policy\\": \\"OR('Org2MSP.member')\\", - \\"requiredPeerCount\\": 1, - \\"maxPeerCount\\": 3, - \\"blockToLive\\": 0 - } -]" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"################################################################################ -# SECTION: Capabilities -################################################################################ -Capabilities: - Channel: &ChannelCapabilities - V1_3: true - Orderer: &OrdererCapabilities - V1_1: true - Application: &ApplicationCapabilities - V1_3: true - -################################################################################ -# CHANNEL Defaults -################################################################################ -Channel: &ChannelDefaults - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - Capabilities: - <<: *ChannelCapabilities - -################################################################################ -# Section: Organizations -################################################################################ -Organizations: - - &Orderer - Name: OrdererMSP - ID: OrdererMSP - MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - - AnchorPeers: - - - &Org1 - Name: Org1MSP - ID: Org1MSP - MSPDir: crypto-config/peerOrganizations/org1.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - - AnchorPeers: - - Host: peer0.org1.example.com - Port: 7041 - - - Host: peer1.org1.example.com - Port: 7042 - - - &Org2 - Name: Org2MSP - ID: Org2MSP - MSPDir: crypto-config/peerOrganizations/org2.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('Org2MSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - - AnchorPeers: - - Host: peer0.org2.example.com - Port: 7061 - -################################################################################ -# SECTION: Application -################################################################################ -Application: &ApplicationDefaults - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Application policies, their canonical path is - # /Channel/Application/ - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - Endorsement: - Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" - Capabilities: - <<: *ApplicationCapabilities - -################################################################################ -# SECTION: Orderer -################################################################################ -Orderer: &Group1Defaults - OrdererType: solo - Addresses: - - orderer0.group1.orderer.example.com:7030 - BatchTimeout: 2s - BatchSize: - MaxMessageCount: 10 - AbsoluteMaxBytes: 99 MB - PreferredMaxBytes: 512 KB - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Orderer policies, their canonical path is - # /Channel/Orderer/ - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - # BlockValidation specifies what signatures must be included in the block - # from the orderer for the peer to validate it. - BlockValidation: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Capabilities: - <<: *OrdererCapabilities - -################################################################################ -# Profile -################################################################################ -# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml - -Profiles: - # Profile used to create Genesis block for group group1 # - Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel1 # - MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" - }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" - } - }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"name: fablo-test-network-orderer -description: Connection profile for Orderer in Fablo network -version: 1.0.0 -client: - organization: Orderer -organizations: - Orderer: - mspid: OrdererMSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.orderer.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.orderer.example.com: - url: http://localhost:7020 - caName: ca.orderer.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" - }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" - } - }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"name: fablo-test-network-org1 -description: Connection profile for Org1 in Fablo network -version: 1.0.0 -client: - organization: Org1 -organizations: - Org1: - mspid: Org1MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.org1.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.org1.example.com: - url: http://localhost:7040 - caName: ca.org1.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Org2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\" - }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.org2.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" - } - }, - \\"certificateAuthorities\\": { - \\"ca.org2.example.com\\": { - \\"url\\": \\"http://localhost:7060\\", - \\"caName\\": \\"ca.org2.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"name: fablo-test-network-org2 -description: Connection profile for Org2 in Fablo network -version: 1.0.0 -client: - organization: Org2 -organizations: - Org2: - mspid: Org2MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.org2.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.org2.example.com: - url: http://localhost:7060 - caName: ca.org2.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"PeerOrgs: - - Name: Orderer - Domain: orderer.example.com - Specs: - - Hostname: orderer0.group1 - Template: - Count: 0 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"PeerOrgs: - - Name: Org1 - Domain: org1.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"PeerOrgs: - - Name: Org2 - Domain: org2.example.com - Specs: - Template: - Count: 1 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" - }, - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" - } - }, - \\"license\\": \\"Apache-2.0\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - orderer: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org1: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org2: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" - -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" - -networkUp() { - generateArtifacts - startNetwork - generateChannelsArtifacts - installChannels - installChaincodes - notifyOrgsAboutChannels - printStartSuccessInfo -} - -if [ \\"$1\\" = \\"up\\" ]; then - networkUp -elif [ \\"$1\\" = \\"down\\" ]; then - networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then - networkDown - networkUp -elif [ \\"$1\\" = \\"start\\" ]; then - startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then - stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then - printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then - printHelp -else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" -fi -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"FABLO_VERSION=1.2.1-unstable.0 -FABLO_BUILD= -FABLO_REST_VERSION=0.1.0 -HYPERLEDGER_EXPLORER_VERSION=1.1.8 - -COUCHDB_VERSION=3.1 -FABRIC_COUCHDB_VERSION=0.4.18 - -FABLO_CONFIG= -CHAINCODES_BASE_DIR= - -COMPOSE_PROJECT_NAME= -LOGGING_LEVEL=info - -FABRIC_VERSION=1.3.0 -FABRIC_CA_VERSION=1.3.0 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=1.3.0 -FABRIC_BASEOS_VERSION=0.4.9 -FABRIC_JAVAENV_VERSION=1.3 -FABRIC_NODEENV_VERSION=1.3 -RECOMMENDED_NODE_VERSION=12 - -ROOT_CA_ADMIN_NAME=admin -ROOT_CA_ADMIN_PASSWORD=adminpw - -ORDERER_CA_ADMIN_NAME=admin -ORDERER_CA_ADMIN_PASSWORD=adminpw - -ORG1_CA_ADMIN_NAME=admin -ORG1_CA_ADMIN_PASSWORD=adminpw - -ORG2_CA_ADMIN_NAME=admin -ORG2_CA_ADMIN_PASSWORD=adminpw - -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" - exit 1 - - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then - - peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name - - elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] - then - - peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name - - elif - [ \\"$1\\" = \\"peer0.org2.example.com\\" ] - then - - peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name - - else - - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" - exit 1 - - fi -} - -# Function to perform chaincode invoke. Accepts 5 parameters: -# 1. comma-separated peers -# 2. channel name -# 3. chaincode name -# 4. chaincode command -# 5. transient data (optional) -chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" - exit 1 - fi - cli=\\"\\" - peer_addresses=\\"\\" - - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" - - fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" - - fi - if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" - - fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" - exit 1 - fi - - peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" - -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" - -set -eu - -channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" - - if [ \\"$#\\" -eq 1 ]; then - printChannelsHelp - - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then - - peerChannelList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] - then - - peerChannelList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] - then - - peerChannelList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" - - elif - - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] - then - - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] - then - - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] - then - - peerChannelGetInfo \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"$TARGET_FILE\\" - - else - - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" - printChannelsHelp - fi - -} - -printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" - - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" - - # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" -} - -startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) - sleep 4 -} - -generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" -} - -installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" - - printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" - printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" -} - -installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/chaincode1.json\\" - else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - -} - -installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" - exit 1 - fi - - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" - exit 1 - fi - - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/chaincode1.json\\" - - else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi -} - -runDevModeChaincode() { - echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" - exit 1 -} - -upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" - exit 1 - fi - - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" - exit 1 - fi - - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" - - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/chaincode1.json\\" - - else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi -} - -notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" -} - -printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" -} - -stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) - sleep 4 -} - -networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) - - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer1.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org2.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" - - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"version: '2.2' - -networks: - basic: - -services: - - ca.orderer.example.com: - container_name: ca.orderer.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7020:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.orderer.example.com: - container_name: cli.orderer.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.orderer.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=OrdererMSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json\\" - networks: - - basic - - orderer0.group1.orderer.example.com: - container_name: orderer0.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7030 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7030:7030 - - 8030:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - ca.org1.example.com: - container_name: ca.org1.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7040:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org1.example.com: - container_name: cli.org1.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org1.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json\\" - networks: - - basic - - peer0.org1.example.com: - container_name: peer0.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer0.org1.example.com - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8041:9440 - - 7041:7041 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org1.example.com: - container_name: peer1.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer1.org1.example.com - - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8042:9440 - - 7042:7042 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - - ca.org2.example.com: - container_name: ca.org2.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7060:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org2.example.com: - container_name: cli.org2.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org2.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"../fabric-config/collections/chaincode1.json:/var/hyperledger/cli/collections/chaincode1.json\\" - networks: - - basic - - peer0.org2.example.com: - container_name: peer0.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer0.org2.example.com - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7061 - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8061:9440 - - 7061:7061 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -certsGenerate() { - local CONTAINER_NAME=certsGenerate - - local CONFIG_PATH=$1 - local CRYPTO_CONFIG_FILE_NAME=$2 - local ORG_PATH=$3 - local OUTPUT_PATH=$4 - local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" - - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME - - # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem - done -} - -genesisBlockCreate() { - local CONTAINER_NAME=genesisBlockCreate - - local CONFIG_PATH=$1 - local OUTPUT_PATH=$2 - local GENESIS_PROFILE_NAME=$3 - local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" - - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME - - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createChannelTx() { - local CONTAINER_NAME=createChannelTx - - local CHANNEL_NAME=$1 - local CONFIG_PATH=$2 - local CONFIG_PROFILE=$3 - local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx - - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" - - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createNewChannelUpdateTx() { - local CONTAINER_NAME=createAnchorPeerUpdateTx - - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CONFIG_PROFILE=$3 - local CONFIG_PATH=$4 - local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -notifyOrgAboutNewChannel() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -notifyOrgAboutNewChannelTls() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -deleteNewChannelUpdateTx() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" -} - -printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" -} - -inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' - - echo \\"\${darkGray} $1 \${end}\\" -} - -inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' - - echo \\"\${darkGray} $1 \${end}\\" -} - -certsRemove() { - local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" -} - -removeContainer() { - CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. -# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u - -dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" - fi -} - -chaincodeBuild() { - local CHAINCODE_NAME=$1 - local CHAINCODE_LANG=$2 - local CHAINCODE_DIR_PATH=$3 - local RECOMMENDED_NODE_VERSION=$4 - - mkdir -p \\"$CHAINCODE_DIR_PATH\\" - - # pull required images upfront in case of arm64 (Apple Silicon) architecture - # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" - fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" - fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" - fi - fi - - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - NODE_VERSION=\\"$(node --version)\\" - - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" - fi - - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" - fi - - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" - - # Default to using npm for installation and build - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) - - fi - -} - -chaincodeInstall() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local CA_CERT=$8 - - echo \\"Installing chaincode on $CHANNEL_NAME...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} - -chaincodeInstantiate() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} - -chaincodeUpgrade() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -peerChannelList() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list -} - -peerChannelGetInfo() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" -} - -peerChannelFetchConfig() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ - --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ -} - -#=== TLS equivalents ========================================================= - -peerChannelListTls() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CA_CERT=$3 - - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" -} - -peerChannelGetInfoTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - local CA_CERT=$4 - - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" -} - -peerChannelFetchConfigTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - local CA_CERT=$5 - - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ - --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -createChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - - local ORDERER_URL=$5 - - local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . - - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block - - rm -rf \\"$DIR_NAME\\" -} - -createChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . - - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" - - rm -rf \\"$DIR_NAME\\" -} - -fetchChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - - local ORDERER_URL=$5 - - local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block - - rm -rf \\"$DIR_NAME\\" -} - -fetchChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" - - rm -rf \\"$DIR_NAME\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -__getOrdererAndPeerNodes() { - echo \\" - orderer0.group1.orderer.example.com - peer0.org1.example.com - peer1.org1.example.com - peer0.org2.example.com - \\" -} - -__getCASQLiteNodes() { - echo \\" - ca.orderer.example.com - ca.org1.example.com - ca.org2.example.com - \\" -} - -__getCAPostgresNodes() { - echo \\" - \\" -} - -__createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" - - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" - exit 1 - fi - - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" - - for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" - done - - for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" - done - - for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" - done -} - -__cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" - - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" - exit 1 - fi - - cp -R ./fablo-target \\"$target_dir/fablo-target\\" - - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") - fi - - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) - - for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" - fi - done - - for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" - fi - done - - for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" - fi - done -} - -createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") -} - -cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") -} -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -"#!/usr/bin/env bash - -# The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" -" -`; - -exports[`samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json should create proper files from samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json 1`] = ` -Array [ - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/.gitignore", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/collections/chaincode1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/configtx.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/.env", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.3-2orgs-1chaincode-private-data.json.tmpdir/fablo-target/hooks/post-generate.sh", -] -`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap deleted file mode 100644 index 848a7124..00000000 --- a/e2e/__snapshots__/fablo-config-hlf1.4-1org-1chaincode-raft.json.test.ts.snap +++ /dev/null @@ -1,3066 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"/config -/crypto-config -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"################################################################################ -# SECTION: Capabilities -################################################################################ -Capabilities: - Channel: &ChannelCapabilities - V1_4_3: true - Orderer: &OrdererCapabilities - V1_4_2: true - Application: &ApplicationCapabilities - V1_4_2: true - -################################################################################ -# CHANNEL Defaults -################################################################################ -Channel: &ChannelDefaults - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - Capabilities: - <<: *ChannelCapabilities - -################################################################################ -# Section: Organizations -################################################################################ -Organizations: - - &Orderer - Name: OrdererMSP - ID: OrdererMSP - MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - - AnchorPeers: - - - &Org1 - Name: Org1MSP - ID: Org1MSP - MSPDir: crypto-config/peerOrganizations/org1.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - - AnchorPeers: - - Host: peer0.org1.example.com - Port: 7041 - - - Host: peer1.org1.example.com - Port: 7042 - -################################################################################ -# SECTION: Application -################################################################################ -Application: &ApplicationDefaults - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Application policies, their canonical path is - # /Channel/Application/ - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - Endorsement: - Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" - Capabilities: - <<: *ApplicationCapabilities - -################################################################################ -# SECTION: Orderer -################################################################################ -Orderer: &Group1Defaults - OrdererType: etcdraft - Addresses: - - orderer0.group1.orderer.example.com:7030 - EtcdRaft: - Consenters: - - Host: orderer0.group1.orderer.example.com - Port: 7030 - ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt - ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt - - BatchTimeout: 2s - BatchSize: - MaxMessageCount: 10 - AbsoluteMaxBytes: 99 MB - PreferredMaxBytes: 512 KB - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Orderer policies, their canonical path is - # /Channel/Orderer/ - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - # BlockValidation specifies what signatures must be included in the block - # from the orderer for the peer to validate it. - BlockValidation: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Capabilities: - <<: *OrdererCapabilities - -################################################################################ -# Profile -################################################################################ -# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml - -Profiles: - # Profile used to create Genesis block for group group1 # - Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - # Profile used to create channeltx for my-channel1 # - MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" - }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" - } - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" - } - } - }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"https://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" - }, - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"name: fablo-test-network-orderer -description: Connection profile for Orderer in Fablo network -version: 1.0.0 -client: - organization: Orderer -organizations: - Orderer: - mspid: OrdererMSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - certificateAuthorities: - - ca.orderer.example.com -peers: - peer0.org1.example.com: - url: grpcs://localhost:7041 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org1.example.com - peer1.org1.example.com: - url: grpcs://localhost:7042 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org1.example.com -certificateAuthorities: - ca.orderer.example.com: - url: https://localhost:7020 - caName: ca.orderer.example.com - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" - }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" - } - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" - } - } - }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"https://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" - }, - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"name: fablo-test-network-org1 -description: Connection profile for Org1 in Fablo network -version: 1.0.0 -client: - organization: Org1 -organizations: - Org1: - mspid: Org1MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - certificateAuthorities: - - ca.org1.example.com -peers: - peer0.org1.example.com: - url: grpcs://localhost:7041 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org1.example.com - peer1.org1.example.com: - url: grpcs://localhost:7042 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org1.example.com -certificateAuthorities: - ca.org1.example.com: - url: https://localhost:7040 - caName: ca.org1.example.com - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"PeerOrgs: - - Name: Orderer - Domain: orderer.example.com - Specs: - - Hostname: orderer0.group1 - Template: - Count: 0 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"PeerOrgs: - - Name: Org1 - Domain: org1.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" - } - }, - \\"license\\": \\"Apache-2.0\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - orderer: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org1: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" - -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" - -networkUp() { - generateArtifacts - startNetwork - generateChannelsArtifacts - installChannels - installChaincodes - notifyOrgsAboutChannels - printStartSuccessInfo -} - -if [ \\"$1\\" = \\"up\\" ]; then - networkUp -elif [ \\"$1\\" = \\"down\\" ]; then - networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then - networkDown - networkUp -elif [ \\"$1\\" = \\"start\\" ]; then - startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then - stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then - printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then - printHelp -else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" -fi -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"FABLO_VERSION=1.2.1-unstable.0 -FABLO_BUILD= -FABLO_REST_VERSION=0.1.0 -HYPERLEDGER_EXPLORER_VERSION=1.1.8 - -COUCHDB_VERSION=3.1 -FABRIC_COUCHDB_VERSION=0.4.18 - -FABLO_CONFIG= -CHAINCODES_BASE_DIR= - -COMPOSE_PROJECT_NAME= -LOGGING_LEVEL=debug - -FABRIC_VERSION=1.4.6 -FABRIC_CA_VERSION=1.4.6 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=1.4.6 -FABRIC_BASEOS_VERSION=0.4.9 -FABRIC_JAVAENV_VERSION=1.4 -FABRIC_NODEENV_VERSION=1.4 -RECOMMENDED_NODE_VERSION=12 - -ROOT_CA_ADMIN_NAME=admin -ROOT_CA_ADMIN_PASSWORD=adminpw - -ORDERER_CA_ADMIN_NAME=admin -ORDERER_CA_ADMIN_PASSWORD=adminpw - -ORG1_CA_ADMIN_NAME=admin -ORG1_CA_ADMIN_PASSWORD=adminpw - -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" - exit 1 - - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then - - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name - - elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] - then - - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name - - else - - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" - exit 1 - - fi -} - -# Function to perform chaincode invoke. Accepts 5 parameters: -# 1. comma-separated peers -# 2. channel name -# 3. chaincode name -# 4. chaincode command -# 5. transient data (optional) -chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" - exit 1 - fi - cli=\\"\\" - peer_addresses=\\"\\" - - peer_certs=\\"\\" - - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" - - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" - - fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" - - peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" - - fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" - exit 1 - fi - - if [ \\"$2\\" = \\"my-channel1\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - fi - - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" - -set -eu - -channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" - - if [ \\"$#\\" -eq 1 ]; then - printChannelsHelp - - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then - - peerChannelListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] - then - - peerChannelListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif - - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] - then - - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] - then - - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" - - else - - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" - printChannelsHelp - fi - -} - -printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" - - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" - - # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" -} - -startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) - sleep 4 -} - -generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" -} - -installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - - printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" -} - -installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - -} - -installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" - exit 1 - fi - - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" - exit 1 - fi - - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - - else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi -} - -runDevModeChaincode() { - echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" - exit 1 -} - -upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" - exit 1 - fi - - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" - exit 1 - fi - - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" - - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - - else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi -} - -notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" -} - -printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" -} - -stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) - sleep 4 -} - -networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) - - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer1.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" - - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"version: '2.2' - -networks: - basic: - -services: - - ca.orderer.example.com: - container_name: ca.orderer.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - FABRIC_CA_SERVER_TLS_ENABLED=true - ports: - - 7020:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.orderer.example.com: - container_name: cli.orderer.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.orderer.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=OrdererMSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.crt - - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.key - - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/ca.crt - - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - networks: - - basic - - orderer0.group1.orderer.example.com: - container_name: orderer0.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7030 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - # metrics - - ORDERER_OPERATIONS_LISTENADDRESS=orderer0.group1.orderer.example.com:9440 - - ORDERER_METRICS_PROVIDER=prometheus - # enabled TLS - - ORDERER_GENERAL_TLS_ENABLED=true - - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7030:7030 - - 8030:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - ca.org1.example.com: - container_name: ca.org1.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - FABRIC_CA_SERVER_TLS_ENABLED=true - ports: - - 7040:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org1.example.com: - container_name: cli.org1.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org1.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.crt - - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.key - - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/ca.crt - - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - networks: - - basic - - peer0.org1.example.com: - container_name: peer0.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer0.org1.example.com - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8041:9440 - - 7041:7041 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org1.example.com: - container_name: peer1.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer1.org1.example.com - - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8042:9440 - - 7042:7042 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -certsGenerate() { - local CONTAINER_NAME=certsGenerate - - local CONFIG_PATH=$1 - local CRYPTO_CONFIG_FILE_NAME=$2 - local ORG_PATH=$3 - local OUTPUT_PATH=$4 - local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" - - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME - - # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem - done -} - -genesisBlockCreate() { - local CONTAINER_NAME=genesisBlockCreate - - local CONFIG_PATH=$1 - local OUTPUT_PATH=$2 - local GENESIS_PROFILE_NAME=$3 - local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" - - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME - - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createChannelTx() { - local CONTAINER_NAME=createChannelTx - - local CHANNEL_NAME=$1 - local CONFIG_PATH=$2 - local CONFIG_PROFILE=$3 - local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx - - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" - - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createNewChannelUpdateTx() { - local CONTAINER_NAME=createAnchorPeerUpdateTx - - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CONFIG_PROFILE=$3 - local CONFIG_PATH=$4 - local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -notifyOrgAboutNewChannel() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -notifyOrgAboutNewChannelTls() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -deleteNewChannelUpdateTx() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" -} - -printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" -} - -inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' - - echo \\"\${darkGray} $1 \${end}\\" -} - -inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' - - echo \\"\${darkGray} $1 \${end}\\" -} - -certsRemove() { - local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" -} - -removeContainer() { - CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. -# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u - -dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" - fi -} - -chaincodeBuild() { - local CHAINCODE_NAME=$1 - local CHAINCODE_LANG=$2 - local CHAINCODE_DIR_PATH=$3 - local RECOMMENDED_NODE_VERSION=$4 - - mkdir -p \\"$CHAINCODE_DIR_PATH\\" - - # pull required images upfront in case of arm64 (Apple Silicon) architecture - # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" - fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" - fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" - fi - fi - - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - NODE_VERSION=\\"$(node --version)\\" - - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" - fi - - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" - fi - - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" - - # Default to using npm for installation and build - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) - - fi - -} - -chaincodeInstall() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local CA_CERT=$8 - - echo \\"Installing chaincode on $CHANNEL_NAME...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} - -chaincodeInstantiate() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} - -chaincodeUpgrade() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -peerChannelList() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list -} - -peerChannelGetInfo() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" -} - -peerChannelFetchConfig() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ - --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ -} - -#=== TLS equivalents ========================================================= - -peerChannelListTls() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CA_CERT=$3 - - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" -} - -peerChannelGetInfoTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - local CA_CERT=$4 - - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" -} - -peerChannelFetchConfigTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - local CA_CERT=$5 - - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ - --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -createChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - - local ORDERER_URL=$5 - - local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . - - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block - - rm -rf \\"$DIR_NAME\\" -} - -createChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . - - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" - - rm -rf \\"$DIR_NAME\\" -} - -fetchChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - - local ORDERER_URL=$5 - - local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block - - rm -rf \\"$DIR_NAME\\" -} - -fetchChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" - - rm -rf \\"$DIR_NAME\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -__getOrdererAndPeerNodes() { - echo \\" - orderer0.group1.orderer.example.com - peer0.org1.example.com - peer1.org1.example.com - \\" -} - -__getCASQLiteNodes() { - echo \\" - ca.orderer.example.com - ca.org1.example.com - \\" -} - -__getCAPostgresNodes() { - echo \\" - \\" -} - -__createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" - - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" - exit 1 - fi - - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" - - for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" - done - - for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" - done - - for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" - done -} - -__cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" - - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" - exit 1 - fi - - cp -R ./fablo-target \\"$target_dir/fablo-target\\" - - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") - fi - - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) - - for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" - fi - done - - for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" - fi - done - - for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" - fi - done -} - -createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") -} - -cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") -} -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -"#!/usr/bin/env bash - -# The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" -" -`; - -exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create proper files from samples/fablo-config-hlf1.4-1org-1chaincode-raft.json 1`] = ` -Array [ - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/.gitignore", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/.env", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-1org-1chaincode-raft.json.tmpdir/fablo-target/hooks/post-generate.sh", -] -`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap deleted file mode 100644 index ba269a03..00000000 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-1chaincode.json.test.ts.snap +++ /dev/null @@ -1,3883 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"/config -/crypto-config -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"################################################################################ -# SECTION: Capabilities -################################################################################ -Capabilities: - Channel: &ChannelCapabilities - V1_4_3: true - Orderer: &OrdererCapabilities - V1_4_2: true - Application: &ApplicationCapabilities - V1_4_2: true - -################################################################################ -# CHANNEL Defaults -################################################################################ -Channel: &ChannelDefaults - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - Capabilities: - <<: *ChannelCapabilities - -################################################################################ -# Section: Organizations -################################################################################ -Organizations: - - &Orderer - Name: OrdererMSP - ID: OrdererMSP - MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - - AnchorPeers: - - - &Org1 - Name: Org1MSP - ID: Org1MSP - MSPDir: crypto-config/peerOrganizations/org1.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - - AnchorPeers: - - Host: peer0.org1.example.com - Port: 7041 - - - Host: peer1.org1.example.com - Port: 7042 - - - &Org2 - Name: Org2MSP - ID: Org2MSP - MSPDir: crypto-config/peerOrganizations/org2.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('Org2MSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - - AnchorPeers: - - Host: peer0.org2.example.com - Port: 7061 - - - Host: peer1.org2.example.com - Port: 7062 - -################################################################################ -# SECTION: Application -################################################################################ -Application: &ApplicationDefaults - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Application policies, their canonical path is - # /Channel/Application/ - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - Endorsement: - Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" - Capabilities: - <<: *ApplicationCapabilities - -################################################################################ -# SECTION: Orderer -################################################################################ -Orderer: &Group1Defaults - OrdererType: solo - Addresses: - - orderer0.group1.orderer.example.com:7030 - BatchTimeout: 2s - BatchSize: - MaxMessageCount: 10 - AbsoluteMaxBytes: 99 MB - PreferredMaxBytes: 512 KB - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Orderer policies, their canonical path is - # /Channel/Orderer/ - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - # BlockValidation specifies what signatures must be included in the block - # from the orderer for the peer to validate it. - BlockValidation: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Capabilities: - <<: *OrdererCapabilities - -################################################################################ -# Profile -################################################################################ -# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml - -Profiles: - # Profile used to create Genesis block for group group1 # - Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel1 # - MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel2 # - MyChannel2: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" - }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" - }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7062\\" - } - }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"name: fablo-test-network-orderer -description: Connection profile for Orderer in Fablo network -version: 1.0.0 -client: - organization: Orderer -organizations: - Orderer: - mspid: OrdererMSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.orderer.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 - peer1.org2.example.com: - url: grpc://localhost:7062 -certificateAuthorities: - ca.orderer.example.com: - url: http://localhost:7020 - caName: ca.orderer.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" - }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" - }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7062\\" - } - }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"name: fablo-test-network-org1 -description: Connection profile for Org1 in Fablo network -version: 1.0.0 -client: - organization: Org1 -organizations: - Org1: - mspid: Org1MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.org1.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 - peer1.org2.example.com: - url: grpc://localhost:7062 -certificateAuthorities: - ca.org1.example.com: - url: http://localhost:7040 - caName: ca.org1.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Org2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\" - }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.org2.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" - }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7062\\" - } - }, - \\"certificateAuthorities\\": { - \\"ca.org2.example.com\\": { - \\"url\\": \\"http://localhost:7060\\", - \\"caName\\": \\"ca.org2.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"name: fablo-test-network-org2 -description: Connection profile for Org2 in Fablo network -version: 1.0.0 -client: - organization: Org2 -organizations: - Org2: - mspid: Org2MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.org2.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 - peer1.org2.example.com: - url: grpc://localhost:7062 -certificateAuthorities: - ca.org2.example.com: - url: http://localhost:7060 - caName: ca.org2.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"PeerOrgs: - - Name: Orderer - Domain: orderer.example.com - Specs: - - Hostname: orderer0.group1 - Template: - Count: 0 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"PeerOrgs: - - Name: Org1 - Domain: org1.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"PeerOrgs: - - Name: Org2 - Domain: org2.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" - }, - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" - } - }, - \\"license\\": \\"Apache-2.0\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - orderer: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org1: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org2: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" - -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" - -networkUp() { - generateArtifacts - startNetwork - generateChannelsArtifacts - installChannels - installChaincodes - notifyOrgsAboutChannels - printStartSuccessInfo -} - -if [ \\"$1\\" = \\"up\\" ]; then - networkUp -elif [ \\"$1\\" = \\"down\\" ]; then - networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then - networkDown - networkUp -elif [ \\"$1\\" = \\"start\\" ]; then - startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then - stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then - printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then - printHelp -else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" -fi -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"FABLO_VERSION=1.2.1-unstable.0 -FABLO_BUILD= -FABLO_REST_VERSION=0.1.0 -HYPERLEDGER_EXPLORER_VERSION=1.1.8 - -COUCHDB_VERSION=3.1 -FABRIC_COUCHDB_VERSION=0.4.18 - -FABLO_CONFIG= -CHAINCODES_BASE_DIR= - -COMPOSE_PROJECT_NAME= -LOGGING_LEVEL=info - -FABRIC_VERSION=1.4.6 -FABRIC_CA_VERSION=1.4.6 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=1.4.6 -FABRIC_BASEOS_VERSION=0.4.9 -FABRIC_JAVAENV_VERSION=1.4 -FABRIC_NODEENV_VERSION=1.4 -RECOMMENDED_NODE_VERSION=12 - -ROOT_CA_ADMIN_NAME=admin -ROOT_CA_ADMIN_PASSWORD=adminpw - -ORDERER_CA_ADMIN_NAME=admin -ORDERER_CA_ADMIN_PASSWORD=adminpw - -ORG1_CA_ADMIN_NAME=admin -ORG1_CA_ADMIN_PASSWORD=adminpw - -ORG2_CA_ADMIN_NAME=admin -ORG2_CA_ADMIN_PASSWORD=adminpw - -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" - exit 1 - - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then - - peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name - - elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] - then - - peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name - - elif - [ \\"$1\\" = \\"peer0.org2.example.com\\" ] - then - - peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name - - elif - [ \\"$1\\" = \\"peer1.org2.example.com\\" ] - then - - peerChaincodeList \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"$2\\" # $2 is channel name - - else - - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" - exit 1 - - fi -} - -# Function to perform chaincode invoke. Accepts 5 parameters: -# 1. comma-separated peers -# 2. channel name -# 3. chaincode name -# 4. chaincode command -# 5. transient data (optional) -chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" - exit 1 - fi - cli=\\"\\" - peer_addresses=\\"\\" - - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" - - fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" - - fi - if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" - - fi - if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" - - fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" - exit 1 - fi - - peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" - -set -eu - -channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" - - if [ \\"$#\\" -eq 1 ]; then - printChannelsHelp - - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then - - peerChannelList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] - then - - peerChannelList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] - then - - peerChannelList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer1\\" ] - then - - peerChannelList \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" - - elif - - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] - then - - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] - then - - peerChannelGetInfo \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] - then - - peerChannelGetInfo \\"my-channel2\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfig \\"my-channel2\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlock \\"my-channel2\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer1\\" ] - then - - peerChannelGetInfo \\"my-channel2\\" \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfig \\"my-channel2\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org2.example.com:7062\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlock \\"my-channel2\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org2.example.com:7062\\" \\"$TARGET_FILE\\" - - else - - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" - printChannelsHelp - fi - -} - -printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org2 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org2 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org2 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" - - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" - - # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" -} - -startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) - sleep 4 -} - -generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - printHeadline \\"Generating config for 'my-channel2'\\" \\"U1F913\\" - createChannelTx \\"my-channel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" -} - -installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" - - printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" - printHeadline \\"Creating 'my-channel2' on Org1/peer1\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" - - printItalics \\"Joining 'my-channel2' on Org2/peer1\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" -} - -installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"\\" - else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - -} - -installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" - exit 1 - fi - - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" - exit 1 - fi - - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"\\" - - else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi -} - -runDevModeChaincode() { - echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" - exit 1 -} - -upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" - exit 1 - fi - - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" - exit 1 - fi - - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" - - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND ('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"\\" - - else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi -} - -notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - notifyOrgAboutNewChannel \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - notifyOrgAboutNewChannel \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" -} - -printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" -} - -stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) - sleep 4 -} - -networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) - - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org2.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" - - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"version: '2.2' - -networks: - basic: - -services: - - ca.orderer.example.com: - container_name: ca.orderer.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7020:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.orderer.example.com: - container_name: cli.orderer.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.orderer.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=OrdererMSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - networks: - - basic - - orderer0.group1.orderer.example.com: - container_name: orderer0.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7030 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7030:7030 - - 8030:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - ca.org1.example.com: - container_name: ca.org1.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7040:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org1.example.com: - container_name: cli.org1.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org1.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - networks: - - basic - - peer0.org1.example.com: - container_name: peer0.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer0.org1.example.com - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8041:9440 - - 7041:7041 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org1.example.com: - container_name: peer1.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer1.org1.example.com - - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8042:9440 - - 7042:7042 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - - ca.org2.example.com: - container_name: ca.org2.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7060:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org2.example.com: - container_name: cli.org2.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org2.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - networks: - - basic - - peer0.org2.example.com: - container_name: peer0.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer0.org2.example.com - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8061:9440 - - 7061:7061 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org2.example.com: - container_name: peer1.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer1.org2.example.com - - CORE_PEER_ADDRESS=peer1.org2.example.com:7062 - - CORE_PEER_LISTENADDRESS=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8062:9440 - - 7062:7062 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -certsGenerate() { - local CONTAINER_NAME=certsGenerate - - local CONFIG_PATH=$1 - local CRYPTO_CONFIG_FILE_NAME=$2 - local ORG_PATH=$3 - local OUTPUT_PATH=$4 - local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" - - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME - - # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem - done -} - -genesisBlockCreate() { - local CONTAINER_NAME=genesisBlockCreate - - local CONFIG_PATH=$1 - local OUTPUT_PATH=$2 - local GENESIS_PROFILE_NAME=$3 - local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" - - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME - - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createChannelTx() { - local CONTAINER_NAME=createChannelTx - - local CHANNEL_NAME=$1 - local CONFIG_PATH=$2 - local CONFIG_PROFILE=$3 - local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx - - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" - - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createNewChannelUpdateTx() { - local CONTAINER_NAME=createAnchorPeerUpdateTx - - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CONFIG_PROFILE=$3 - local CONFIG_PATH=$4 - local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -notifyOrgAboutNewChannel() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -notifyOrgAboutNewChannelTls() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -deleteNewChannelUpdateTx() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" -} - -printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" -} - -inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' - - echo \\"\${darkGray} $1 \${end}\\" -} - -inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' - - echo \\"\${darkGray} $1 \${end}\\" -} - -certsRemove() { - local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" -} - -removeContainer() { - CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. -# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u - -dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" - fi -} - -chaincodeBuild() { - local CHAINCODE_NAME=$1 - local CHAINCODE_LANG=$2 - local CHAINCODE_DIR_PATH=$3 - local RECOMMENDED_NODE_VERSION=$4 - - mkdir -p \\"$CHAINCODE_DIR_PATH\\" - - # pull required images upfront in case of arm64 (Apple Silicon) architecture - # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" - fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" - fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" - fi - fi - - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - NODE_VERSION=\\"$(node --version)\\" - - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" - fi - - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" - fi - - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" - - # Default to using npm for installation and build - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) - - fi - -} - -chaincodeInstall() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local CA_CERT=$8 - - echo \\"Installing chaincode on $CHANNEL_NAME...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} - -chaincodeInstantiate() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} - -chaincodeUpgrade() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -peerChannelList() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list -} - -peerChannelGetInfo() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" -} - -peerChannelFetchConfig() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ - --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ -} - -#=== TLS equivalents ========================================================= - -peerChannelListTls() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CA_CERT=$3 - - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" -} - -peerChannelGetInfoTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - local CA_CERT=$4 - - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" -} - -peerChannelFetchConfigTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - local CA_CERT=$5 - - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ - --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -createChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - - local ORDERER_URL=$5 - - local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . - - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block - - rm -rf \\"$DIR_NAME\\" -} - -createChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . - - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" - - rm -rf \\"$DIR_NAME\\" -} - -fetchChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - - local ORDERER_URL=$5 - - local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block - - rm -rf \\"$DIR_NAME\\" -} - -fetchChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" - - rm -rf \\"$DIR_NAME\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -__getOrdererAndPeerNodes() { - echo \\" - orderer0.group1.orderer.example.com - peer0.org1.example.com - peer1.org1.example.com - peer0.org2.example.com - peer1.org2.example.com - \\" -} - -__getCASQLiteNodes() { - echo \\" - ca.orderer.example.com - ca.org1.example.com - ca.org2.example.com - \\" -} - -__getCAPostgresNodes() { - echo \\" - \\" -} - -__createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" - - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" - exit 1 - fi - - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" - - for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" - done - - for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" - done - - for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" - done -} - -__cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" - - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" - exit 1 - fi - - cp -R ./fablo-target \\"$target_dir/fablo-target\\" - - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") - fi - - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) - - for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" - fi - done - - for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" - fi - done - - for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" - fi - done -} - -createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") -} - -cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -"#!/usr/bin/env bash - -# The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-1chaincode.json should create proper files from samples/fablo-config-hlf1.4-2orgs-1chaincode.json 1`] = ` -Array [ - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/configtx.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/.env", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-1chaincode.json.tmpdir/fablo-target/hooks/post-generate.sh", -] -`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap deleted file mode 100644 index f4882278..00000000 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ /dev/null @@ -1,3864 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"/config -/crypto-config -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/and-policy-chaincode.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"[ - { - \\"name\\": \\"org1-collection\\", - \\"policy\\": \\"OR('Org1MSP.member')\\", - \\"requiredPeerCount\\": 1, - \\"maxPeerCount\\": 3, - \\"blockToLive\\": 0, - \\"memberOnlyRead\\": true - } -]" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/or-policy-chaincode.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"[ - { - \\"name\\": \\"org1-collection\\", - \\"policy\\": \\"OR('Org1MSP.member')\\", - \\"requiredPeerCount\\": 1, - \\"maxPeerCount\\": 3, - \\"blockToLive\\": 0, - \\"memberOnlyRead\\": true - } -]" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"################################################################################ -# SECTION: Capabilities -################################################################################ -Capabilities: - Channel: &ChannelCapabilities - V1_4_3: true - Orderer: &OrdererCapabilities - V1_4_2: true - Application: &ApplicationCapabilities - V1_4_2: true - -################################################################################ -# CHANNEL Defaults -################################################################################ -Channel: &ChannelDefaults - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - Capabilities: - <<: *ChannelCapabilities - -################################################################################ -# Section: Organizations -################################################################################ -Organizations: - - &Orderer - Name: OrdererMSP - ID: OrdererMSP - MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - - AnchorPeers: - - - &Org1 - Name: Org1MSP - ID: Org1MSP - MSPDir: crypto-config/peerOrganizations/org1.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - - AnchorPeers: - - Host: peer0.org1.example.com - Port: 7041 - - - Host: peer1.org1.example.com - Port: 7042 - - - &Org2 - Name: Org2MSP - ID: Org2MSP - MSPDir: crypto-config/peerOrganizations/org2.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('Org2MSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - - AnchorPeers: - - Host: peer0.org2.example.com - Port: 7061 - -################################################################################ -# SECTION: Application -################################################################################ -Application: &ApplicationDefaults - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Application policies, their canonical path is - # /Channel/Application/ - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - Endorsement: - Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" - Capabilities: - <<: *ApplicationCapabilities - -################################################################################ -# SECTION: Orderer -################################################################################ -Orderer: &Group1Defaults - OrdererType: solo - Addresses: - - orderer0.group1.orderer.example.com:7030 - BatchTimeout: 2s - BatchSize: - MaxMessageCount: 10 - AbsoluteMaxBytes: 99 MB - PreferredMaxBytes: 512 KB - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Orderer policies, their canonical path is - # /Channel/Orderer/ - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - # BlockValidation specifies what signatures must be included in the block - # from the orderer for the peer to validate it. - BlockValidation: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Capabilities: - <<: *OrdererCapabilities - -################################################################################ -# Profile -################################################################################ -# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml - -Profiles: - # Profile used to create Genesis block for group group1 # - Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel1 # - MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" - }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" - } - }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"http://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"name: fablo-test-network-orderer -description: Connection profile for Orderer in Fablo network -version: 1.0.0 -client: - organization: Orderer -organizations: - Orderer: - mspid: OrdererMSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.orderer.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.orderer.example.com: - url: http://localhost:7020 - caName: ca.orderer.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" - }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" - } - }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"http://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"name: fablo-test-network-org1 -description: Connection profile for Org1 in Fablo network -version: 1.0.0 -client: - organization: Org1 -organizations: - Org1: - mspid: Org1MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.org1.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.org1.example.com: - url: http://localhost:7040 - caName: ca.org1.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Org2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\" - }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.org2.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7041\\" - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpc://localhost:7042\\" - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpc://localhost:7061\\" - } - }, - \\"certificateAuthorities\\": { - \\"ca.org2.example.com\\": { - \\"url\\": \\"http://localhost:7060\\", - \\"caName\\": \\"ca.org2.example.com\\", - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"name: fablo-test-network-org2 -description: Connection profile for Org2 in Fablo network -version: 1.0.0 -client: - organization: Org2 -organizations: - Org2: - mspid: Org2MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - certificateAuthorities: - - ca.org2.example.com -peers: - peer0.org1.example.com: - url: grpc://localhost:7041 - peer1.org1.example.com: - url: grpc://localhost:7042 - peer0.org2.example.com: - url: grpc://localhost:7061 -certificateAuthorities: - ca.org2.example.com: - url: http://localhost:7060 - caName: ca.org2.example.com - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"PeerOrgs: - - Name: Orderer - Domain: orderer.example.com - Specs: - - Hostname: orderer0.group1 - Template: - Count: 0 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"PeerOrgs: - - Name: Org1 - Domain: org1.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"PeerOrgs: - - Name: Org2 - Domain: org2.example.com - Specs: - Template: - Count: 1 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" - }, - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" - } - }, - \\"license\\": \\"Apache-2.0\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - orderer: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org1: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org2: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -set -eu - -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" - -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" - -networkUp() { - generateArtifacts - startNetwork - generateChannelsArtifacts - installChannels - installChaincodes - notifyOrgsAboutChannels - printStartSuccessInfo -} - -if [ \\"$1\\" = \\"up\\" ]; then - networkUp -elif [ \\"$1\\" = \\"down\\" ]; then - networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then - networkDown - networkUp -elif [ \\"$1\\" = \\"start\\" ]; then - startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then - stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then - printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then - printHelp -else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" -fi -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"FABLO_VERSION=1.2.1-unstable.0 -FABLO_BUILD= -FABLO_REST_VERSION=0.1.0 -HYPERLEDGER_EXPLORER_VERSION=1.1.8 - -COUCHDB_VERSION=3.1 -FABRIC_COUCHDB_VERSION=0.4.18 - -FABLO_CONFIG= -CHAINCODES_BASE_DIR= - -COMPOSE_PROJECT_NAME= -LOGGING_LEVEL=info - -FABRIC_VERSION=1.4.11 -FABRIC_CA_VERSION=1.5.5 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=1.4.11 -FABRIC_BASEOS_VERSION=0.4.9 -FABRIC_JAVAENV_VERSION=1.4 -FABRIC_NODEENV_VERSION=1.4 -RECOMMENDED_NODE_VERSION=12 - -ROOT_CA_ADMIN_NAME=admin -ROOT_CA_ADMIN_PASSWORD=adminpw - -ORDERER_CA_ADMIN_NAME=admin -ORDERER_CA_ADMIN_PASSWORD=adminpw - -ORG1_CA_ADMIN_NAME=admin -ORG1_CA_ADMIN_PASSWORD=adminpw - -ORG2_CA_ADMIN_NAME=admin -ORG2_CA_ADMIN_PASSWORD=adminpw - -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" - exit 1 - - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then - - peerChaincodeList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" # $2 is channel name - - elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] - then - - peerChaincodeList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" # $2 is channel name - - elif - [ \\"$1\\" = \\"peer0.org2.example.com\\" ] - then - - peerChaincodeList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" # $2 is channel name - - else - - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" - exit 1 - - fi -} - -# Function to perform chaincode invoke. Accepts 5 parameters: -# 1. comma-separated peers -# 2. channel name -# 3. chaincode name -# 4. chaincode command -# 5. transient data (optional) -chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" - exit 1 - fi - cli=\\"\\" - peer_addresses=\\"\\" - - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" - - fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" - - fi - if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" - - fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" - exit 1 - fi - - peerChaincodeInvoke \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" - -set -eu - -channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" - - if [ \\"$#\\" -eq 1 ]; then - printChannelsHelp - - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then - - peerChannelList \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] - then - - peerChannelList \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] - then - - peerChannelList \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" - - elif - - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] - then - - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] - then - - peerChannelGetInfo \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] - then - - peerChannelGetInfo \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfig \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlock \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"$TARGET_FILE\\" - - else - - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" - printChannelsHelp - fi - -} - -printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" - - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" - - # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" -} - -startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) - sleep 4 -} - -generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" -} - -installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" - - printItalics \\"Joining 'my-channel1' on Org1/peer1\\" \\"U1F638\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" - printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';\\" -} - -installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"or-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/or-policy-chaincode.json\\" - else - echo \\"Warning! Skipping chaincode 'or-policy-chaincode' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"and-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/and-policy-chaincode.json\\" - else - echo \\"Warning! Skipping chaincode 'and-policy-chaincode' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - -} - -installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" - exit 1 - fi - - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" - exit 1 - fi - - if [ \\"$chaincodeName\\" = \\"or-policy-chaincode\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"or-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/or-policy-chaincode.json\\" - - else - echo \\"Warning! Skipping chaincode 'or-policy-chaincode' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi - if [ \\"$chaincodeName\\" = \\"and-policy-chaincode\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"and-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Instantiating chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/and-policy-chaincode.json\\" - - else - echo \\"Warning! Skipping chaincode 'and-policy-chaincode' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi -} - -runDevModeChaincode() { - echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" - exit 1 -} - -upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" - exit 1 - fi - - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" - exit 1 - fi - - if [ \\"$chaincodeName\\" = \\"or-policy-chaincode\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"or-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" - - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - - printHeadline \\"Installing 'or-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Upgrading as 'Org1'. 'or-policy-chaincode' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"or-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/or-policy-chaincode.json\\" - - else - echo \\"Warning! Skipping chaincode 'or-policy-chaincode' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi - if [ \\"$chaincodeName\\" = \\"and-policy-chaincode\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"and-policy-chaincode\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" - - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - - printHeadline \\"Installing 'and-policy-chaincode' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"\\" - printItalics \\"Upgrading as 'Org1'. 'and-policy-chaincode' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"and-policy-chaincode\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"AND('Org1MSP.member', 'Org2MSP.member')\\" \\"\\" \\"collections/and-policy-chaincode.json\\" - - else - echo \\"Warning! Skipping chaincode 'and-policy-chaincode' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi -} - -notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - notifyOrgAboutNewChannel \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" - - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" -} - -printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" -} - -stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) - sleep 4 -} - -networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) - - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-or-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org1.example.com-or-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-or-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer1.org1.example.com-or-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-or-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org2.example.com-or-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-and-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org1.example.com-and-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-and-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer1.org1.example.com-and-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-and-policy-chaincode\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org2.example.com-and-policy-chaincode*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" - - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"version: '2.2' - -networks: - basic: - -services: - - ca.orderer.example.com: - container_name: ca.orderer.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7020:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.orderer.example.com: - container_name: cli.orderer.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.orderer.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=OrdererMSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/\\" - - \\"../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/\\" - - \\"../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json\\" - networks: - - basic - - orderer0.group1.orderer.example.com: - container_name: orderer0.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7030 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7030:7030 - - 8030:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - ca.org1.example.com: - container_name: ca.org1.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7040:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org1.example.com: - container_name: cli.org1.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org1.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/\\" - - \\"../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/\\" - - \\"../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json\\" - networks: - - basic - - peer0.org1.example.com: - container_name: peer0.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer0.org1.example.com - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8041:9440 - - 7041:7041 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org1.example.com: - container_name: peer1.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer1.org1.example.com - - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8042:9440 - - 7042:7042 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - - ca.org2.example.com: - container_name: ca.org2.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - ports: - - 7060:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org2.example.com: - container_name: cli.org2.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org2.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/or-policy-chaincode/\\" - - \\"../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/and-policy-chaincode/\\" - - \\"../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json\\" - networks: - - basic - - peer0.org2.example.com: - container_name: peer0.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer0.org2.example.com - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7061 - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8061:9440 - - 7061:7061 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -certsGenerate() { - local CONTAINER_NAME=certsGenerate - - local CONFIG_PATH=$1 - local CRYPTO_CONFIG_FILE_NAME=$2 - local ORG_PATH=$3 - local OUTPUT_PATH=$4 - local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" - - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME - - # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem - done -} - -genesisBlockCreate() { - local CONTAINER_NAME=genesisBlockCreate - - local CONFIG_PATH=$1 - local OUTPUT_PATH=$2 - local GENESIS_PROFILE_NAME=$3 - local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" - - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME - - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createChannelTx() { - local CONTAINER_NAME=createChannelTx - - local CHANNEL_NAME=$1 - local CONFIG_PATH=$2 - local CONFIG_PROFILE=$3 - local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx - - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" - - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createNewChannelUpdateTx() { - local CONTAINER_NAME=createAnchorPeerUpdateTx - - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CONFIG_PROFILE=$3 - local CONFIG_PATH=$4 - local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -notifyOrgAboutNewChannel() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -notifyOrgAboutNewChannelTls() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -deleteNewChannelUpdateTx() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" -} - -printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" -} - -inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' - - echo \\"\${darkGray} $1 \${end}\\" -} - -inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' - - echo \\"\${darkGray} $1 \${end}\\" -} - -certsRemove() { - local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" -} - -removeContainer() { - CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. -# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u - -dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" - fi -} - -chaincodeBuild() { - local CHAINCODE_NAME=$1 - local CHAINCODE_LANG=$2 - local CHAINCODE_DIR_PATH=$3 - local RECOMMENDED_NODE_VERSION=$4 - - mkdir -p \\"$CHAINCODE_DIR_PATH\\" - - # pull required images upfront in case of arm64 (Apple Silicon) architecture - # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" - fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" - fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" - fi - fi - - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - NODE_VERSION=\\"$(node --version)\\" - - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" - fi - - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" - fi - - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" - - # Default to using npm for installation and build - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) - - fi - -} - -chaincodeInstall() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local CA_CERT=$8 - - echo \\"Installing chaincode on $CHANNEL_NAME...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} - -chaincodeInstantiate() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} - -chaincodeUpgrade() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -peerChannelList() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list -} - -peerChannelGetInfo() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" -} - -peerChannelFetchConfig() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ - --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ -} - -#=== TLS equivalents ========================================================= - -peerChannelListTls() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CA_CERT=$3 - - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" -} - -peerChannelGetInfoTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - local CA_CERT=$4 - - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" -} - -peerChannelFetchConfigTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - local CA_CERT=$5 - - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ - --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -set -eu - -createChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - - local ORDERER_URL=$5 - - local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . - - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block - - rm -rf \\"$DIR_NAME\\" -} - -createChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . - - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" - - rm -rf \\"$DIR_NAME\\" -} - -fetchChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - - local ORDERER_URL=$5 - - local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block - - rm -rf \\"$DIR_NAME\\" -} - -fetchChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" - - rm -rf \\"$DIR_NAME\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -__getOrdererAndPeerNodes() { - echo \\" - orderer0.group1.orderer.example.com - peer0.org1.example.com - peer1.org1.example.com - peer0.org2.example.com - \\" -} - -__getCASQLiteNodes() { - echo \\" - ca.orderer.example.com - ca.org1.example.com - ca.org2.example.com - \\" -} - -__getCAPostgresNodes() { - echo \\" - \\" -} - -__createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" - - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" - exit 1 - fi - - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" - - for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" - done - - for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" - done - - for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" - done -} - -__cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" - - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" - exit 1 - fi - - cp -R ./fablo-target \\"$target_dir/fablo-target\\" - - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") - fi - - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) - - for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" - fi - done - - for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" - fi - done - - for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" - fi - done -} - -createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") -} - -cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -"#!/usr/bin/env bash - -# The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml should create proper files from samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml 1`] = ` -Array [ - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/.gitignore", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/and-policy-chaincode.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/or-policy-chaincode.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/configtx.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/explorer/config-global.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/commands-generated.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/hooks/post-generate.sh", -] -`; diff --git a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap deleted file mode 100644 index 04dd4d04..00000000 --- a/e2e/__snapshots__/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.test.ts.snap +++ /dev/null @@ -1,4274 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"/config -/crypto-config -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"################################################################################ -# SECTION: Capabilities -################################################################################ -Capabilities: - Channel: &ChannelCapabilities - V1_4_3: true - Orderer: &OrdererCapabilities - V1_4_2: true - Application: &ApplicationCapabilities - V1_4_2: true - -################################################################################ -# CHANNEL Defaults -################################################################################ -Channel: &ChannelDefaults - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - Capabilities: - <<: *ChannelCapabilities - -################################################################################ -# Section: Organizations -################################################################################ -Organizations: - - &Orderer - Name: OrdererMSP - ID: OrdererMSP - MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('OrdererMSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('OrdererMSP.member')\\" - - AnchorPeers: - - - &Org1 - Name: Org1MSP - ID: Org1MSP - MSPDir: crypto-config/peerOrganizations/org1.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('Org1MSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('Org1MSP.member')\\" - - AnchorPeers: - - Host: peer0.org1.example.com - Port: 7041 - - - Host: peer1.org1.example.com - Port: 7042 - - - &Org2 - Name: Org2MSP - ID: Org2MSP - MSPDir: crypto-config/peerOrganizations/org2.example.com/msp - - Policies: - Readers: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - Writers: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - Admins: - Type: Signature - Rule: \\"OR('Org2MSP.admin')\\" - Endorsement: - Type: Signature - Rule: \\"OR('Org2MSP.member')\\" - - AnchorPeers: - - Host: peer0.org2.example.com - Port: 7061 - - - Host: peer1.org2.example.com - Port: 7062 - -################################################################################ -# SECTION: Application -################################################################################ -Application: &ApplicationDefaults - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Application policies, their canonical path is - # /Channel/Application/ - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - Endorsement: - Type: ImplicitMeta - Rule: \\"MAJORITY Endorsement\\" - Capabilities: - <<: *ApplicationCapabilities - -################################################################################ -# SECTION: Orderer -################################################################################ -Orderer: &Group1Defaults - OrdererType: etcdraft - Addresses: - - orderer0.group1.orderer.example.com:7030 - - orderer1.group1.orderer.example.com:7031 - - orderer2.group1.orderer.example.com:7032 - EtcdRaft: - Consenters: - - Host: orderer0.group1.orderer.example.com - Port: 7030 - ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt - ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt - - - Host: orderer1.group1.orderer.example.com - Port: 7031 - ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/tls/server.crt - ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/tls/server.crt - - - Host: orderer2.group1.orderer.example.com - Port: 7032 - ClientTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/tls/server.crt - ServerTLSCert: crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/tls/server.crt - - BatchTimeout: 2s - BatchSize: - MaxMessageCount: 10 - AbsoluteMaxBytes: 99 MB - PreferredMaxBytes: 512 KB - Organizations: - # Policies defines the set of policies at this level of the config tree - # For Orderer policies, their canonical path is - # /Channel/Orderer/ - Policies: - Readers: - Type: ImplicitMeta - Rule: \\"ANY Readers\\" - Writers: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Admins: - Type: ImplicitMeta - Rule: \\"MAJORITY Admins\\" - # BlockValidation specifies what signatures must be included in the block - # from the orderer for the peer to validate it. - BlockValidation: - Type: ImplicitMeta - Rule: \\"ANY Writers\\" - Capabilities: - <<: *OrdererCapabilities - -################################################################################ -# Profile -################################################################################ -# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml - -Profiles: - # Profile used to create Genesis block for group group1 # - Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel1 # - MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 - - # Profile used to create channeltx for my-channel2 # - MyChannel2: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-orderer\\", - \\"description\\": \\"Connection profile for Orderer in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Orderer\\" - }, - \\"organizations\\": { - \\"Orderer\\": { - \\"mspid\\": \\"OrdererMSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.orderer.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" - } - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" - } - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" - } - }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" - } - } - }, - \\"certificateAuthorities\\": { - \\"ca.orderer.example.com\\": { - \\"url\\": \\"https://localhost:7020\\", - \\"caName\\": \\"ca.orderer.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\" - }, - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"name: fablo-test-network-orderer -description: Connection profile for Orderer in Fablo network -version: 1.0.0 -client: - organization: Orderer -organizations: - Orderer: - mspid: OrdererMSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.orderer.example.com -peers: - peer0.org1.example.com: - url: grpcs://localhost:7041 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org1.example.com - peer1.org1.example.com: - url: grpcs://localhost:7042 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org1.example.com - peer0.org2.example.com: - url: grpcs://localhost:7061 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org2.example.com - peer1.org2.example.com: - url: grpcs://localhost:7062 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org2.example.com -certificateAuthorities: - ca.orderer.example.com: - url: https://localhost:7020 - caName: ca.orderer.example.com - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-org1\\", - \\"description\\": \\"Connection profile for Org1 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org1\\" - }, - \\"organizations\\": { - \\"Org1\\": { - \\"mspid\\": \\"Org1MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.org1.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" - } - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" - } - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" - } - }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" - } - } - }, - \\"certificateAuthorities\\": { - \\"ca.org1.example.com\\": { - \\"url\\": \\"https://localhost:7040\\", - \\"caName\\": \\"ca.org1.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\" - }, - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"name: fablo-test-network-org1 -description: Connection profile for Org1 in Fablo network -version: 1.0.0 -client: - organization: Org1 -organizations: - Org1: - mspid: Org1MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.org1.example.com -peers: - peer0.org1.example.com: - url: grpcs://localhost:7041 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org1.example.com - peer1.org1.example.com: - url: grpcs://localhost:7042 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org1.example.com - peer0.org2.example.com: - url: grpcs://localhost:7061 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org2.example.com - peer1.org2.example.com: - url: grpcs://localhost:7062 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org2.example.com -certificateAuthorities: - ca.org1.example.com: - url: https://localhost:7040 - caName: ca.org1.example.com - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"{ - \\"name\\": \\"fablo-test-network-org2\\", - \\"description\\": \\"Connection profile for Org2 in Fablo network\\", - \\"version\\": \\"1.0.0\\", - \\"client\\": { - \\"organization\\": \\"Org2\\" - }, - \\"organizations\\": { - \\"Org2\\": { - \\"mspid\\": \\"Org2MSP\\", - \\"peers\\": [ - \\"peer0.org1.example.com\\", - \\"peer1.org1.example.com\\", - \\"peer0.org2.example.com\\", - \\"peer1.org2.example.com\\" - ], - \\"certificateAuthorities\\": [ - \\"ca.org2.example.com\\" - ] - } - }, - \\"peers\\": { - \\"peer0.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7041\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org1.example.com\\" - } - }, - \\"peer1.org1.example.com\\": { - \\"url\\": \\"grpcs://localhost:7042\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org1.example.com\\" - } - }, - \\"peer0.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7061\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer0.org2.example.com\\" - } - }, - \\"peer1.org2.example.com\\": { - \\"url\\": \\"grpcs://localhost:7062\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt\\" - }, - \\"grpcOptions\\": { - \\"ssl-target-name-override\\": \\"peer1.org2.example.com\\" - } - } - }, - \\"certificateAuthorities\\": { - \\"ca.org2.example.com\\": { - \\"url\\": \\"https://localhost:7060\\", - \\"caName\\": \\"ca.org2.example.com\\", - \\"tlsCACerts\\": { - \\"path\\": \\"/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\" - }, - \\"httpOptions\\": { - \\"verify\\": false - } - } - } -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"name: fablo-test-network-org2 -description: Connection profile for Org2 in Fablo network -version: 1.0.0 -client: - organization: Org2 -organizations: - Org2: - mspid: Org2MSP - peers: - - peer0.org1.example.com - - peer1.org1.example.com - - peer0.org2.example.com - - peer1.org2.example.com - certificateAuthorities: - - ca.org2.example.com -peers: - peer0.org1.example.com: - url: grpcs://localhost:7041 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org1.example.com - peer1.org1.example.com: - url: grpcs://localhost:7042 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org1.example.com - peer0.org2.example.com: - url: grpcs://localhost:7061 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer0.org2.example.com - peer1.org2.example.com: - url: grpcs://localhost:7062 - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt - grpcOptions: - ssl-target-name-override: peer1.org2.example.com -certificateAuthorities: - ca.org2.example.com: - url: https://localhost:7060 - caName: ca.org2.example.com - tlsCACerts: - path: >- - /samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem - httpOptions: - verify: false -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"PeerOrgs: - - Name: Orderer - Domain: orderer.example.com - Specs: - - Hostname: orderer0.group1 - - Hostname: orderer1.group1 - - Hostname: orderer2.group1 - Template: - Count: 0 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"PeerOrgs: - - Name: Org1 - Domain: org1.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"PeerOrgs: - - Name: Org2 - Domain: org2.example.com - Specs: - Template: - Count: 2 - Users: - Count: 1 -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"{ - \\"network-configs\\": { - \\"network-org1\\": { - \\"name\\": \\"Network of Org1\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json\\" - }, - \\"network-org2\\": { - \\"name\\": \\"Network of Org2\\", - \\"profile\\": \\"/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json\\" - } - }, - \\"license\\": \\"Apache-2.0\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - orderer: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org1: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"############################################################################# -# This is a configuration file for the fabric-ca-server command. -# -# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES -# ------------------------------------------------ -# Each configuration element can be overridden via command line -# arguments or environment variables. The precedence for determining -# the value of each element is as follows: -# 1) command line argument -# Examples: -# a) --port 443 -# To set the listening port -# b) --ca.keyfile ../mykey.pem -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '.' separator character. -# 2) environment variable -# Examples: -# a) FABRIC_CA_SERVER_PORT=443 -# To set the listening port -# b) FABRIC_CA_SERVER_CA_KEYFILE=\\"../mykey.pem\\" -# To set the \\"keyfile\\" element in the \\"ca\\" section below; -# note the '_' separator character. -# 3) configuration file -# 4) default value (if there is one) -# All default values are shown beside each element below. -# -# FILE NAME ELEMENTS -# ------------------ -# The value of all fields whose name ends with \\"file\\" or \\"files\\" are -# name or names of other files. -# For example, see \\"tls.certfile\\" and \\"tls.clientauth.certfiles\\". -# The value of each of these fields can be a simple filename, a -# relative path, or an absolute path. If the value is not an -# absolute path, it is interpreted as being relative to the location -# of this configuration file. -# -############################################################################# - -# Version of config file -version: 1.5.5 - -# Server's listening port (default: 7054) -port: 7054 - -# Cross-Origin Resource Sharing (CORS) -cors: - enabled: false - origins: - - \\"*\\" - -# Enables debug logging (default: false) -debug: false - -# Size limit of an acceptable CRL in bytes (default: 512000) -crlsizelimit: 512000 - -############################################################################# -# TLS section for the server's listening port -# -# The following types are supported for client authentication: NoClientCert, -# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, -# and RequireAndVerifyClientCert. -# -# Certfiles is a list of root certificate authorities that the server uses -# when verifying client certificates. -############################################################################# -tls: - # Enable TLS (default: false) - enabled: false - # TLS for the server's listening port - certfile: - keyfile: - clientauth: - type: noclientcert - certfiles: - -############################################################################# -# The CA section contains information related to the Certificate Authority -# including the name of the CA, which should be unique for all members -# of a blockchain network. It also includes the key and certificate files -# used when issuing enrollment certificates (ECerts). -# The chainfile (if it exists) contains the certificate chain which -# should be trusted for this CA, where the 1st in the chain is always the -# root CA certificate. -############################################################################# -ca: - # Name of this CA - name: - # Key file (is only used to import a private key into BCCSP) - keyfile: - # Certificate file (default: ca-cert.pem) - certfile: - # Chain file - chainfile: - -############################################################################# -# The gencrl REST endpoint is used to generate a CRL that contains revoked -# certificates. This section contains configuration options that are used -# during gencrl request processing. -############################################################################# -crl: - # Specifies expiration for the generated CRL. The number of hours - # specified by this property is added to the UTC time, the resulting time - # is used to set the 'Next Update' date of the CRL. - expiry: 24h - -############################################################################# -# The registry section controls how the fabric-ca-server does two things: -# 1) authenticates enrollment requests which contain a username and password -# (also known as an enrollment ID and secret). -# 2) once authenticated, retrieves the identity's attribute names and values. -# These attributes are useful for making access control decisions in -# chaincode. -# There are two main configuration options: -# 1) The fabric-ca-server is the registry. -# This is true if \\"ldap.enabled\\" in the ldap section below is false. -# 2) An LDAP server is the registry, in which case the fabric-ca-server -# calls the LDAP server to perform these tasks. -# This is true if \\"ldap.enabled\\" in the ldap section below is true, -# which means this \\"registry\\" section is ignored. -############################################################################# -registry: - # Maximum number of times a password/secret can be reused for enrollment - # (default: -1, which means there is no limit) - maxenrollments: -1 - - # Contains identity information which is used when LDAP is disabled - identities: - - name: admin - pass: adminpw - type: client - affiliation: \\"\\" - attrs: - hf.Registrar.Roles: \\"*\\" - hf.Registrar.DelegateRoles: \\"*\\" - hf.Revoker: true - hf.IntermediateCA: true - hf.GenCRL: true - hf.Registrar.Attributes: \\"*\\" - hf.AffiliationMgr: true - -############################################################################# -# Database section -# Supported types are: \\"sqlite3\\", \\"postgres\\", and \\"mysql\\". -# The datasource value depends on the type. -# If the type is \\"sqlite3\\", the datasource value is a file name to use -# as the database store. Since \\"sqlite3\\" is an embedded database, it -# may not be used if you want to run the fabric-ca-server in a cluster. -# To run the fabric-ca-server in a cluster, you must choose \\"postgres\\" -# or \\"mysql\\". -############################################################################# -db: - type: sqlite3 - datasource: fabric-ca-server.db - tls: - enabled: false - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# LDAP section -# If LDAP is enabled, the fabric-ca-server calls LDAP to: -# 1) authenticate enrollment ID and secret (i.e. username and password) -# for enrollment requests; -# 2) To retrieve identity attributes -############################################################################# -ldap: - # Enables or disables the LDAP client (default: false) - # If this is set to true, the \\"registry\\" section is ignored. - enabled: false - # The URL of the LDAP server - url: ldap://:@:/ - # TLS configuration for the client connection to the LDAP server - tls: - certfiles: - client: - certfile: - keyfile: - # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes - attribute: - # 'names' is an array of strings containing the LDAP attribute names which are - # requested from the LDAP server for an LDAP identity's entry - names: ['uid', 'member'] - # The 'converters' section is used to convert an LDAP entry to the value of - # a fabric CA attribute. - # For example, the following converts an LDAP 'uid' attribute - # whose value begins with 'revoker' to a fabric CA attribute - # named \\"hf.Revoker\\" with a value of \\"true\\" (because the boolean expression - # evaluates to true). - # converters: - # - name: hf.Revoker - # value: attr(\\"uid\\") =~ \\"revoker*\\" - converters: - - name: - value: - # The 'maps' section contains named maps which may be referenced by the 'map' - # function in the 'converters' section to map LDAP responses to arbitrary values. - # For example, assume a user has an LDAP attribute named 'member' which has multiple - # values which are each a distinguished name (i.e. a DN). For simplicity, assume the - # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. - # Further assume the following configuration. - # converters: - # - name: hf.Registrar.Roles - # value: map(attr(\\"member\\"),\\"groups\\") - # maps: - # groups: - # - name: dn1 - # value: peer - # - name: dn2 - # value: client - # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be - # \\"peer,client,dn3\\". This is because the value of 'attr(\\"member\\")' is - # \\"dn1,dn2,dn3\\", and the call to 'map' with a 2nd argument of - # \\"group\\" replaces \\"dn1\\" with \\"peer\\" and \\"dn2\\" with \\"client\\". - maps: - groups: - - name: - value: - -############################################################################# -# Affiliations section. Fabric CA server can be bootstrapped with the -# affiliations specified in this section. Affiliations are specified as maps. -# For example: -# businessunit1: -# department1: -# - team1 -# businessunit2: -# - department2 -# - department3 -# -# Affiliations are hierarchical in nature. In the above example, -# department1 (used as businessunit1.department1) is the child of businessunit1. -# team1 (used as businessunit1.department1.team1) is the child of department1. -# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) -# are children of businessunit2. -# Note: Affiliations are case sensitive except for the non-leaf affiliations -# (like businessunit1, department1, businessunit2) that are specified in the configuration file, -# which are always stored in lower case. -############################################################################# -affiliations: - org2: - -############################################################################# -# Signing section -# -# The \\"default\\" subsection is used to sign enrollment certificates; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -# -# The \\"ca\\" profile subsection is used to sign intermediate CA certificates; -# the default expiration (\\"expiry\\" field) is \\"43800h\\" which is 5 years in hours. -# Note that \\"isca\\" is true, meaning that it issues a CA certificate. -# A maxpathlen of 0 means that the intermediate CA cannot issue other -# intermediate CA certificates, though it can still issue end entity certificates. -# (See RFC 5280, section 4.2.1.9) -# -# The \\"tls\\" profile subsection is used to sign TLS certificate requests; -# the default expiration (\\"expiry\\" field) is \\"8760h\\", which is 1 year in hours. -############################################################################# -signing: - default: - usage: - - digital signature - expiry: 8760h - profiles: - ca: - usage: - - cert sign - - crl sign - expiry: 43800h - caconstraint: - isca: true - maxpathlen: 0 - tls: - usage: - - signing - - key encipherment - - server auth - - client auth - - key agreement - expiry: 8760h - -########################################################################### -# Certificate Signing Request (CSR) section. -# This controls the creation of the root CA certificate. -# The expiration for the root CA certificate is configured with the -# \\"ca.expiry\\" field below, whose default value is \\"131400h\\" which is -# 15 years in hours. -# The pathlength field is used to limit CA certificate hierarchy as described -# in section 4.2.1.9 of RFC 5280. -# Examples: -# 1) No pathlength value means no limit is requested. -# 2) pathlength == 1 means a limit of 1 is requested which is the default for -# a root CA. This means the root CA can issue intermediate CA certificates, -# but these intermediate CAs may not in turn issue other CA certificates -# though they can still issue end entity certificates. -# 3) pathlength == 0 means a limit of 0 is requested; -# this is the default for an intermediate CA, which means it can not issue -# CA certificates though it can still issue end entity certificates. -########################################################################### -csr: - cn: fabric-ca-server - keyrequest: - algo: ecdsa - size: 256 - names: - - C: US - ST: \\"North Carolina\\" - L: - O: Hyperledger - OU: Fabric - hosts: - - 483cccf16a98 - - localhost - ca: - expiry: 131400h - pathlength: 1 - -########################################################################### -# Each CA can issue both X509 enrollment certificate as well as Idemix -# Credential. This section specifies configuration for the issuer component -# that is responsible for issuing Idemix credentials. -########################################################################### -idemix: - # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an - # Idemix credential. The issuer will create a pool revocation handles of this specified size. When - # a credential is requested, issuer will get handle from the pool and assign it to the credential. - # Issuer will repopulate the pool with new handles when the last handle in the pool is used. - # A revocation handle and credential revocation information (CRI) are used to create non revocation proof - # by the prover to prove to the verifier that her credential is not revoked. - rhpoolsize: 1000 - - # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer - # and second step is send credential request that is constructed using the nonce to the isuser to - # request a credential. This configuration property specifies expiration for the nonces. By default is - # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). - nonceexpiration: 15s - - # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. - # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) - noncesweepinterval: 15m - -############################################################################# -# BCCSP (BlockChain Crypto Service Provider) section is used to select which -# crypto library implementation to use -############################################################################# -bccsp: - default: SW - sw: - hash: SHA2 - security: 256 - filekeystore: - # The directory used for the software file-based keystore - keystore: msp/keystore - -############################################################################# -# Multi CA section -# -# Each Fabric CA server contains one CA by default. This section is used -# to configure multiple CAs in a single server. -# -# 1) --cacount -# Automatically generate non-default CAs. The names of these -# additional CAs are \\"ca1\\", \\"ca2\\", ... \\"caN\\", where \\"N\\" is -# This is particularly useful in a development environment to quickly set up -# multiple CAs. Note that, this config option is not applicable to intermediate CA server -# i.e., Fabric CA server that is started with intermediate.parentserver.url config -# option (-u command line option) -# -# 2) --cafiles -# For each CA config file in the list, generate a separate signing CA. Each CA -# config file in this list MAY contain all of the same elements as are found in -# the server config file except port, debug, and tls sections. -# -# Examples: -# fabric-ca-server start -b admin:adminpw --cacount 2 -# -# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml -# --cafiles ca/ca2/fabric-ca-server-config.yaml -# -############################################################################# - -cacount: - -cafiles: - -############################################################################# -# Intermediate CA section -# -# The relationship between servers and CAs is as follows: -# 1) A single server process may contain or function as one or more CAs. -# This is configured by the \\"Multi CA section\\" above. -# 2) Each CA is either a root CA or an intermediate CA. -# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. -# -# This section pertains to configuration of #2 and #3. -# If the \\"intermediate.parentserver.url\\" property is set, -# then this is an intermediate CA with the specified parent -# CA. -# -# parentserver section -# url - The URL of the parent server -# caname - Name of the CA to enroll within the server -# -# enrollment section used to enroll intermediate CA with parent CA -# profile - Name of the signing profile to use in issuing the certificate -# label - Label to use in HSM operations -# -# tls section for secure socket connection -# certfiles - PEM-encoded list of trusted root certificate files -# client: -# certfile - PEM-encoded certificate file for when client authentication -# is enabled on server -# keyfile - PEM-encoded key file for when client authentication -# is enabled on server -############################################################################# -intermediate: - parentserver: - url: - caname: - - enrollment: - hosts: - profile: - label: - - tls: - certfiles: - client: - certfile: - keyfile: - -############################################################################# -# CA configuration section -# -# Configure the number of incorrect password attempts are allowed for -# identities. By default, the value of 'passwordattempts' is 10, which -# means that 10 incorrect password attempts can be made before an identity get -# locked out. -############################################################################# -cfg: - identities: - passwordattempts: 10 - -############################################################################### -# -# Operations section -# -############################################################################### -operations: - # host and port for the operations server - listenAddress: 127.0.0.1:9443 - - # TLS configuration for the operations endpoint - tls: - # TLS enabled - enabled: false - - # path to PEM encoded server certificate for the operations server - cert: - file: - - # path to PEM encoded server key for the operations server - key: - file: - - # require client certificate authentication to access all resources - clientAuthRequired: false - - # paths to PEM encoded ca certificates to trust for client authentication - clientRootCAs: - files: [] - -############################################################################### -# -# Metrics section -# -############################################################################### -metrics: - # statsd, prometheus, or disabled - provider: disabled - - # statsd configuration - statsd: - # network type: tcp or udp - network: udp - - # statsd server address - address: 127.0.0.1:8125 - - # the interval at which locally cached counters and gauges are pushed - # to statsd; timings are pushed immediately - writeInterval: 10s - - # prefix is prepended to all emitted statsd metrics - prefix: server -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -FABLO_NETWORK_ROOT=\\"$(cd \\"$(dirname \\"$0\\")\\" && pwd)\\" - -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/.env\\" -source \\"$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh\\" - -networkUp() { - generateArtifacts - startNetwork - generateChannelsArtifacts - installChannels - installChaincodes - notifyOrgsAboutChannels - printStartSuccessInfo -} - -if [ \\"$1\\" = \\"up\\" ]; then - networkUp -elif [ \\"$1\\" = \\"down\\" ]; then - networkDown -elif [ \\"$1\\" = \\"reset\\" ]; then - networkDown - networkUp -elif [ \\"$1\\" = \\"start\\" ]; then - startNetwork -elif [ \\"$1\\" = \\"stop\\" ]; then - stopNetwork -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincodes -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"install\\" ]; then - installChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"upgrade\\" ]; then - upgradeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"dev\\" ]; then - runDevModeChaincode \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"chaincode\\" ] && [ \\"$2\\" = \\"invoke\\" ]; then - chaincodeInvoke \\"$3\\" \\"$4\\" \\"$5\\" \\"$6\\" \\"$7\\" -elif [ \\"$1\\" = \\"chaincodes\\" ] && [ \\"$2\\" = \\"list\\" ]; then - chaincodeList \\"$3\\" \\"$4\\" -elif [ \\"$1\\" = \\"channel\\" ]; then - channelQuery \\"\${@:2}\\" -elif [ \\"$1\\" = \\"snapshot\\" ]; then - createSnapshot \\"$2\\" -elif [ \\"$1\\" = \\"clone-to\\" ]; then - cloneSnapshot \\"$2\\" \\"\${3:-\\"\\"}\\" -elif [ \\"$1\\" = \\"help\\" ]; then - printHelp -elif [ \\"$1\\" = \\"--help\\" ]; then - printHelp -else - echo \\"No command specified\\" - echo \\"Basic commands are: up, down, start, stop, reset\\" - echo \\"To list channel query helper commands type: 'fablo channel --help'\\" - echo \\"Also check: 'chaincode install'\\" - echo \\"Use 'help' or '--help' for more information\\" -fi -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"FABLO_VERSION=1.2.1-unstable.0 -FABLO_BUILD= -FABLO_REST_VERSION=0.1.0 -HYPERLEDGER_EXPLORER_VERSION=1.1.8 - -COUCHDB_VERSION=3.1 -FABRIC_COUCHDB_VERSION=0.4.18 - -FABLO_CONFIG= -CHAINCODES_BASE_DIR= - -COMPOSE_PROJECT_NAME= -LOGGING_LEVEL=info - -FABRIC_VERSION=1.4.6 -FABRIC_CA_VERSION=1.4.6 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=1.4.6 -FABRIC_BASEOS_VERSION=0.4.9 -FABRIC_JAVAENV_VERSION=1.4 -FABRIC_NODEENV_VERSION=1.4 -RECOMMENDED_NODE_VERSION=12 - -ROOT_CA_ADMIN_NAME=admin -ROOT_CA_ADMIN_PASSWORD=adminpw - -ORDERER_CA_ADMIN_NAME=admin -ORDERER_CA_ADMIN_PASSWORD=adminpw - -ORG1_CA_ADMIN_NAME=admin -ORG1_CA_ADMIN_PASSWORD=adminpw - -ORG2_CA_ADMIN_NAME=admin -ORG2_CA_ADMIN_PASSWORD=adminpw - -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -chaincodeList() { - if [ \\"$#\\" -ne 2 ]; then - echo \\"Expected 2 parameters for chaincode list, but got: $*\\" - exit 1 - - elif [ \\"$1\\" = \\"peer0.org1.example.com\\" ]; then - - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name - - elif - [ \\"$1\\" = \\"peer1.org1.example.com\\" ] - then - - peerChaincodeListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name - - elif - [ \\"$1\\" = \\"peer0.org2.example.com\\" ] - then - - peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name - - elif - [ \\"$1\\" = \\"peer1.org2.example.com\\" ] - then - - peerChaincodeListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"$2\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" # Third argument is channel name - - else - - echo \\"Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2\\" - exit 1 - - fi -} - -# Function to perform chaincode invoke. Accepts 5 parameters: -# 1. comma-separated peers -# 2. channel name -# 3. chaincode name -# 4. chaincode command -# 5. transient data (optional) -chaincodeInvoke() { - if [ \\"$#\\" -ne 4 ] && [ \\"$#\\" -ne 5 ]; then - echo \\"Expected 4 or 5 parameters for chaincode list, but got: $*\\" - echo \\"Usage: fablo chaincode invoke [transient]\\" - exit 1 - fi - cli=\\"\\" - peer_addresses=\\"\\" - - peer_certs=\\"\\" - - if [[ \\"$1\\" == *\\"peer0.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org1.example.com:7041\\" - - peer_certs=\\"$peer_certs,crypto/peers/peer0.org1.example.com/tls/ca.crt\\" - - fi - if [[ \\"$1\\" == *\\"peer1.org1.example.com\\"* ]]; then - cli=\\"cli.org1.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org1.example.com:7042\\" - - peer_certs=\\"$peer_certs,crypto/peers/peer1.org1.example.com/tls/ca.crt\\" - - fi - if [[ \\"$1\\" == *\\"peer0.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer0.org2.example.com:7061\\" - - peer_certs=\\"$peer_certs,crypto/peers/peer0.org2.example.com/tls/ca.crt\\" - - fi - if [[ \\"$1\\" == *\\"peer1.org2.example.com\\"* ]]; then - cli=\\"cli.org2.example.com\\" - peer_addresses=\\"$peer_addresses,peer1.org2.example.com:7062\\" - - peer_certs=\\"$peer_certs,crypto/peers/peer1.org2.example.com/tls/ca.crt\\" - - fi - if [ -z \\"$peer_addresses\\" ]; then - echo \\"Unknown peers: $1\\" - exit 1 - fi - - if [ \\"$2\\" = \\"my-channel1\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - fi - - if [ \\"$2\\" = \\"my-channel2\\" ]; then - ca_cert=\\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - fi - - peerChaincodeInvokeTls \\"$cli\\" \\"\${peer_addresses:1}\\" \\"$2\\" \\"$3\\" \\"$4\\" \\"$5\\" \\"\${peer_certs:1}\\" \\"$ca_cert\\" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -source \\"$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh\\" - -set -eu - -channelQuery() { - echo \\"-> Channel query: \\" + \\"$@\\" - - if [ \\"$#\\" -eq 1 ]; then - printChannelsHelp - - elif [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer0\\" ]; then - - peerChannelListTls \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org1\\" ] && [ \\"$3\\" = \\"peer1\\" ] - then - - peerChannelListTls \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer0\\" ] - then - - peerChannelListTls \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif - [ \\"$1\\" = \\"list\\" ] && [ \\"$2\\" = \\"org2\\" ] && [ \\"$3\\" = \\"peer1\\" ] - then - - peerChannelListTls \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif - - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer0\\" ] - then - - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org1.example.com:7041\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel1\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer0\\" ] - then - - peerChannelGetInfoTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfigTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel1\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer0\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlockTls \\"my-channel1\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer0.org2.example.com:7061\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org1\\" ] && [ \\"$4\\" = \\"peer1\\" ] - then - - peerChannelGetInfoTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfigTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org1\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlockTls \\"my-channel2\\" \\"cli.org1.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org1.example.com:7042\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" - - elif - [ \\"$1\\" = \\"getinfo\\" ] && [ \\"$2\\" = \\"my-channel2\\" ] && [ \\"$3\\" = \\"org2\\" ] && [ \\"$4\\" = \\"peer1\\" ] - then - - peerChannelGetInfoTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$2\\" = \\"config\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - TARGET_FILE=\${6:-\\"$channel-config.json\\"} - - peerChannelFetchConfigTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"$TARGET_FILE\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - elif [ \\"$1\\" = \\"fetch\\" ] && [ \\"$3\\" = \\"my-channel2\\" ] && [ \\"$4\\" = \\"org2\\" ] && [ \\"$5\\" = \\"peer1\\" ]; then - BLOCK_NAME=$2 - TARGET_FILE=\${6:-\\"$BLOCK_NAME.block\\"} - - peerChannelFetchBlockTls \\"my-channel2\\" \\"cli.org2.example.com\\" \\"\${BLOCK_NAME}\\" \\"peer1.org2.example.com:7062\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"$TARGET_FILE\\" - - else - - echo \\"$@\\" - echo \\"$1, $2, $3, $4, $5, $6, $7, $#\\" - printChannelsHelp - fi - -} - -printChannelsHelp() { - echo \\"Channel management commands:\\" - echo \\"\\" - - echo \\"fablo channel list org1 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org1 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer0\\" - echo -e \\"\\\\t List channels on 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel list org2 peer1\\" - echo -e \\"\\\\t List channels on 'peer1' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org1 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org1 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org1 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel1 org2 peer0\\" - echo -e \\"\\\\t Get channel info on 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel1 org2 peer0 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel1 org2 peer0 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org1 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org1 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org1 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'\\". - echo \\"\\" - - echo \\"fablo channel getinfo my-channel2 org2 peer1\\" - echo -e \\"\\\\t Get channel info on 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch config my-channel2 org2 peer1 [file-name.json]\\" - echo -e \\"\\\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - echo \\"fablo channel fetch my-channel2 org2 peer1 [file name]\\" - echo -e \\"\\\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org2'\\". - echo \\"\\" - -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -generateArtifacts() { - printHeadline \\"Generating basic configs\\" \\"U1F913\\" - - printItalics \\"Generating crypto material for Orderer\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-orderer.yaml\\" \\"peerOrganizations/orderer.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating crypto material for Org1\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org1.yaml\\" \\"peerOrganizations/org1.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating crypto material for Org2\\" \\"U1F512\\" - certsGenerate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"crypto-config-org2.yaml\\" \\"peerOrganizations/org2.example.com\\" \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config/\\" - - printItalics \\"Generating genesis block for group group1\\" \\"U1F3E0\\" - genesisBlockCreate \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" \\"Group1Genesis\\" - - # Create directory for chaincode packages to avoid permission errors on linux - mkdir -p \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" -} - -startNetwork() { - printHeadline \\"Starting network\\" \\"U1F680\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose up -d) - sleep 4 -} - -generateChannelsArtifacts() { - printHeadline \\"Generating config for 'my-channel1'\\" \\"U1F913\\" - createChannelTx \\"my-channel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - printHeadline \\"Generating config for 'my-channel2'\\" \\"U1F913\\" - createChannelTx \\"my-channel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" -} - -installChannels() { - printHeadline \\"Creating 'my-channel1' on Org1/peer0\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - - printItalics \\"Joining 'my-channel1' on Org2/peer0\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - printHeadline \\"Creating 'my-channel2' on Org1/peer1\\" \\"U1F63B\\" - docker exec -i cli.org1.example.com bash -c \\"source scripts/channel_fns.sh; createChannelAndJoinTls 'my-channel2' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" - - printItalics \\"Joining 'my-channel2' on Org2/peer1\\" \\"U1F638\\" - docker exec -i cli.org2.example.com bash -c \\"source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel2' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';\\" -} - -installChaincodes() { - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - else - echo \\"Warning! Skipping chaincode 'chaincode1' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then - chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" \\"12\\" - printHeadline \\"Installing 'chaincode2' on my-channel2/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode2' on my-channel2/Org2/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - else - echo \\"Warning! Skipping chaincode 'chaincode2' installation. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" - fi - -} - -installChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" - exit 1 - fi - - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" - exit 1 - fi - - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" \\"12\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode1' on channel 'my-channel1' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"0.0.1\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - - else - echo \\"Warning! Skipping chaincode 'chaincode1' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi - if [ \\"$chaincodeName\\" = \\"chaincode2\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then - chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" \\"12\\" - printHeadline \\"Installing 'chaincode2' on my-channel2/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printHeadline \\"Installing 'chaincode2' on my-channel2/Org2/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Instantiating chaincode 'chaincode2' on channel 'my-channel2' as 'Org1'\\" \\"U1F618\\" - chaincodeInstantiate \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"0.0.1\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - - else - echo \\"Warning! Skipping chaincode 'chaincode2' install. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" - fi - fi -} - -runDevModeChaincode() { - echo \\"Running chaincode in dev mode is supported by Fablo only for V2 channel capabilities\\" - exit 1 -} - -upgradeChaincode() { - local chaincodeName=\\"$1\\" - if [ -z \\"$chaincodeName\\" ]; then - echo \\"Error: chaincode name is not provided\\" - exit 1 - fi - - local version=\\"$2\\" - if [ -z \\"$version\\" ]; then - echo \\"Error: chaincode version is not provided\\" - exit 1 - fi - - if [ \\"$chaincodeName\\" = \\"chaincode1\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\")\\" ]; then - chaincodeBuild \\"chaincode1\\" \\"node\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4\\" - - printHeadline \\"Installing 'chaincode1' on my-channel1/Org1/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - printHeadline \\"Installing 'chaincode1' on my-channel1/Org2/peer0\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer0.org2.example.com:7061\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Upgrading as 'Org1'. 'chaincode1' on channel 'my-channel1'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer0.org1.example.com:7041\\" \\"my-channel1\\" \\"chaincode1\\" \\"$version\\" \\"node\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - - else - echo \\"Warning! Skipping chaincode 'chaincode1' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4'\\" - fi - fi - if [ \\"$chaincodeName\\" = \\"chaincode2\\" ]; then - if [ -n \\"$(ls \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\")\\" ]; then - chaincodeBuild \\"chaincode2\\" \\"java\\" \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple\\" - - printHeadline \\"Installing 'chaincode2' on my-channel2/Org1/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - printHeadline \\"Installing 'chaincode2' on my-channel2/Org2/peer1\\" \\"U1F60E\\" - chaincodeInstall \\"cli.org2.example.com\\" \\"peer1.org2.example.com:7062\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - printItalics \\"Upgrading as 'Org1'. 'chaincode2' on channel 'my-channel2'\\" \\"U1F618\\" - chaincodeUpgrade \\"cli.org1.example.com\\" \\"peer1.org1.example.com:7042\\" \\"my-channel2\\" \\"chaincode2\\" \\"$version\\" \\"java\\" \\"orderer0.group1.orderer.example.com:7030\\" '{\\"Args\\":[]}' \\"OR ('Org1MSP.member', 'Org2MSP.member')\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" \\"\\" - - else - echo \\"Warning! Skipping chaincode 'chaincode2' upgrade. Chaincode directory is empty.\\" - echo \\"Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple'\\" - fi - fi -} - -notifyOrgsAboutChannels() { - printHeadline \\"Creating new channel config blocks\\" \\"U1F537\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"MyChannel1\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - createNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"MyChannel2\\" \\"$FABLO_NETWORK_ROOT/fabric-config\\" \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - - printHeadline \\"Notyfing orgs about channels\\" \\"U1F4E2\\" - notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" \\"peer0.org1.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - notifyOrgAboutNewChannelTls \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" \\"peer0.org2.example.com\\" \\"orderer0.group1.orderer.example.com:7030\\" \\"crypto-orderer/tlsca.orderer.example.com-cert.pem\\" - - printHeadline \\"Deleting new channel config blocks\\" \\"U1F52A\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel1\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org1MSP\\" \\"cli.org1.example.com\\" - deleteNewChannelUpdateTx \\"my-channel2\\" \\"Org2MSP\\" \\"cli.org2.example.com\\" -} - -printStartSuccessInfo() { - printHeadline \\"Done! Enjoy your fresh network\\" \\"U1F984\\" -} - -stopNetwork() { - printHeadline \\"Stopping network\\" \\"U1F68F\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose stop) - sleep 4 -} - -networkDown() { - printHeadline \\"Destroying network\\" \\"U1F916\\" - (cd \\"$FABLO_NETWORK_ROOT\\"/fabric-docker && docker-compose down) - - printf \\"Removing chaincode containers & images... \\\\U1F5D1 \\\\n\\" - for container in $(docker ps -a | grep \\"dev-peer0.org1.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org1.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer0.org2.example.com-chaincode1\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer0.org2.example.com-chaincode1*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer1.org1.example.com-chaincode2\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer1.org1.example.com-chaincode2*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - for container in $(docker ps -a | grep \\"dev-peer1.org2.example.com-chaincode2\\" | awk '{print $1}'); do - echo \\"Removing container $container...\\" - docker rm -f \\"$container\\" || echo \\"docker rm of $container failed. Check if all fabric dockers properly was deleted\\" - done - for image in $(docker images \\"dev-peer1.org2.example.com-chaincode2*\\" -q); do - echo \\"Removing image $image...\\" - docker rmi \\"$image\\" || echo \\"docker rmi of $image failed. Check if all fabric dockers properly was deleted\\" - done - - printf \\"Removing generated configs... \\\\U1F5D1 \\\\n\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/crypto-config\\" - rm -rf \\"$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages\\" - - printHeadline \\"Done! Network was purged\\" \\"U1F5D1\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"version: '2.2' - -networks: - basic: - -services: - - ca.orderer.example.com: - container_name: ca.orderer.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - FABRIC_CA_SERVER_TLS_ENABLED=true - ports: - - 7020:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.orderer.example.com: - container_name: cli.orderer.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.orderer.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=OrdererMSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.crt - - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/client.key - - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/tls/ca.crt - - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" - networks: - - basic - - orderer0.group1.orderer.example.com: - container_name: orderer0.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7030 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - # metrics - - ORDERER_OPERATIONS_LISTENADDRESS=orderer0.group1.orderer.example.com:9440 - - ORDERER_METRICS_PROVIDER=prometheus - # enabled TLS - - ORDERER_GENERAL_TLS_ENABLED=true - - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7030:7030 - - 8030:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - orderer1.group1.orderer.example.com: - container_name: orderer1.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7031 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - # metrics - - ORDERER_OPERATIONS_LISTENADDRESS=orderer1.group1.orderer.example.com:9440 - - ORDERER_METRICS_PROVIDER=prometheus - # enabled TLS - - ORDERER_GENERAL_TLS_ENABLED=true - - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7031:7031 - - 8031:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer1.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - orderer2.group1.orderer.example.com: - container_name: orderer2.group1.orderer.example.com - image: hyperledger/fabric-orderer:\${FABRIC_VERSION} - environment: - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 - - ORDERER_GENERAL_LISTENPORT=7032 - - ORDERER_GENERAL_GENESISMETHOD=file - - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/config/Group1Genesis.block - - ORDERER_GENERAL_LOCALMSPID=OrdererMSP - - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp - - GODEBUG=netdns=go - # metrics - - ORDERER_OPERATIONS_LISTENADDRESS=orderer2.group1.orderer.example.com:9440 - - ORDERER_METRICS_PROVIDER=prometheus - # enabled TLS - - ORDERER_GENERAL_TLS_ENABLED=true - - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - - ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/var/hyperledger/orderer/tls/server.crt - - ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/var/hyperledger/orderer/tls/server.key - - ORDERER_GENERAL_CLUSTER_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt] - working_dir: /var/hyperledger/orderer - command: orderer - ports: - - 7032:7032 - - 8032:9440 - volumes: - - ../fabric-config/config/:/var/hyperledger/config - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer2.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls - networks: - - basic - - ca.org1.example.com: - container_name: ca.org1.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - FABRIC_CA_SERVER_TLS_ENABLED=true - ports: - - 7040:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org1.example.com: - container_name: cli.org1.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org1.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.crt - - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/client.key - - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/tls/ca.crt - - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" - networks: - - basic - - peer0.org1.example.com: - container_name: peer0.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer0.org1.example.com - - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8041:9440 - - 7041:7041 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org1.example.com: - container_name: peer1.org1.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org1MSP - - CORE_PEER_ID=peer1.org1.example.com - - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org1.example.com:7041 peer1.org1.example.com:7042\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8042:9440 - - 7042:7042 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - - ca.org2.example.com: - container_name: ca.org2.example.com - image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} - environment: - - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server - - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com - - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem - - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - FABRIC_CA_SERVER_TLS_ENABLED=true - ports: - - 7060:7054 - working_dir: /etc/hyperledger/fabric-ca-server - command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' - volumes: - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto - - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml - networks: - - basic - - cli.org2.example.com: - container_name: cli.org2.example.com - image: hyperledger/fabric-tools:\${FABRIC_VERSION} - tty: true - environment: - - GOPATH=/opt/gopath - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - - CORE_PEER_ID=cli.org2.example.com - - CORE_CHAINCODE_KEEPALIVE=10 - # - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/tls/client.crt - - CORE_PEER_TLS_KEY_FILE=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/tls/client.key - - CORE_PEER_TLS_ROOTCERT_FILE=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/tls/ca.crt - - TLS_CA_CERT_PATH=/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem - working_dir: /var/hyperledger/cli/ - command: /bin/bash - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ - - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ - - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/tlscacerts/tlsca.orderer.example.com-cert.pem:/var/hyperledger/cli/crypto-orderer/tlsca.orderer.example.com-cert.pem:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org1.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer0.org2.example.com/tls/ca.crt:ro - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt:/var/hyperledger/cli/crypto-peer/peer1.org2.example.com/tls/ca.crt:ro - - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node-1.4/:/var/hyperledger/cli/chaincode1/\\" - - \\"$CHAINCODES_BASE_DIR/./chaincodes/chaincode-java-simple/:/var/hyperledger/cli/chaincode2/\\" - networks: - - basic - - peer0.org2.example.com: - container_name: peer0.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer0.org2.example.com - - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8061:9440 - - 7061:7061 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic - peer1.org2.example.com: - container_name: peer1.org2.example.com - image: hyperledger/fabric-peer:\${FABRIC_VERSION} - environment: - - CORE_PEER_LOCALMSPID=Org2MSP - - CORE_PEER_ID=peer1.org2.example.com - - CORE_PEER_ADDRESS=peer1.org2.example.com:7062 - - CORE_PEER_LISTENADDRESS=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_ENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7062 - - CORE_PEER_GOSSIP_BOOTSTRAP=\\"peer0.org2.example.com:7061 peer1.org2.example.com:7062\\" - - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org2.example.com:7050 - - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp - - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} - - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} - - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} - # - - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} - - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} - - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} - # metrics - - CORE_OPERATIONS_LISTENADDRESS=peer1.org2.example.com:9440 - - CORE_METRICS_PROVIDER=prometheus - # - - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic - - CORE_VM_DOCKER_ATTACHSTDOUT=true - - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - - GODEBUG=netdns=go - # enabled TLS - - CORE_PEER_TLS_ENABLED=true - - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/peer/tls/server.crt - - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/peer/tls/server.key - - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/peer/tls/ca.crt - working_dir: /etc/hyperledger/fabric/peer/ - command: peer node start - ports: - - 8062:9440 - - 7062:7062 - volumes: - - /var/run/docker.sock:/host/var/run/docker.sock - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls - - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users - - ../fabric-config/config:/etc/hyperledger/fabric/config - networks: - - basic -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -certsGenerate() { - local CONTAINER_NAME=certsGenerate - - local CONFIG_PATH=$1 - local CRYPTO_CONFIG_FILE_NAME=$2 - local ORG_PATH=$3 - local OUTPUT_PATH=$4 - local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH - - echo \\"Generating certs...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME\\" - inputLog \\"ORG_PATH: $ORG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"FULL_CERT_PATH: $FULL_CERT_PATH\\" - - if [ -d \\"$FULL_CERT_PATH\\" ]; then - echo \\"Can't generate certs, directory already exists : $FULL_CERT_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/\\"$CRYPTO_CONFIG_FILE_NAME\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/crypto-config/. \\"$OUTPUT_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME - - # shellcheck disable=2044 - for file in $(find \\"$OUTPUT_PATH\\"/ -iname '*_sk'); do - dir=$(dirname \\"$file\\") - mv \\"\${dir}\\"/*_sk \\"\${dir}\\"/priv-key.pem - done -} - -genesisBlockCreate() { - local CONTAINER_NAME=genesisBlockCreate - - local CONFIG_PATH=$1 - local OUTPUT_PATH=$2 - local GENESIS_PROFILE_NAME=$3 - local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block - - echo \\"Creating genesis block...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME\\" - inputLog \\"GENESIS_FILE_NAME: $GENESIS_FILE_NAME\\" - - if [ -f \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" ]; then - echo \\"Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"$GENESIS_PROFILE_NAME\\" -outputBlock \\"./config/$GENESIS_FILE_NAME\\" -channelID system-channel || removeContainer $CONTAINER_NAME - - mkdir -p \\"$OUTPUT_PATH\\" - docker cp \\"$CONTAINER_NAME:/config/$GENESIS_FILE_NAME\\" \\"$OUTPUT_PATH/$GENESIS_FILE_NAME\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createChannelTx() { - local CONTAINER_NAME=createChannelTx - - local CHANNEL_NAME=$1 - local CONFIG_PATH=$2 - local CONFIG_PROFILE=$3 - local OUTPUT_PATH=$4 - local CHANNEL_TX_PATH=\\"$OUTPUT_PATH/$CHANNEL_NAME\\".tx - - echo \\"Creating channelTx for $CHANNEL_NAME...\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"CHANNEL_TX_PATH: $CHANNEL_TX_PATH\\" - - if [ -f \\"$CHANNEL_TX_PATH\\" ]; then - echo \\"Can't create channel configuration, it already exists : $CHANNEL_TX_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile \\"\${CONFIG_PROFILE}\\" -outputCreateChannelTx ./config/channel.tx -channelID \\"\${CHANNEL_NAME}\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/channel.tx \\"$CHANNEL_TX_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -createNewChannelUpdateTx() { - local CONTAINER_NAME=createAnchorPeerUpdateTx - - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CONFIG_PROFILE=$3 - local CONFIG_PATH=$4 - local OUTPUT_PATH=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CONFIG_PROFILE: $CONFIG_PROFILE\\" - inputLog \\"CONFIG_PATH: $CONFIG_PATH\\" - inputLog \\"OUTPUT_PATH: $OUTPUT_PATH\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -f \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - echo \\"Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH\\" - echo \\"Try using 'reset' or 'down' to remove whole network or 'start' to reuse it\\" - exit 1 - fi - - docker run -i -d -w=\\"/\\" --name $CONTAINER_NAME hyperledger/fabric-tools:\\"\${FABRIC_VERSION}\\" bash || removeContainer $CONTAINER_NAME - docker cp \\"$CONFIG_PATH\\" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME - - docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME - docker exec -i $CONTAINER_NAME configtxgen \\\\ - --configPath ./fabric-config \\\\ - -profile \\"\${CONFIG_PROFILE}\\" \\\\ - -outputAnchorPeersUpdate ./config/\\"\${MSP_NAME}\\"anchors.tx \\\\ - -channelID \\"\${CHANNEL_NAME}\\" \\\\ - -asOrg \\"\${MSP_NAME}\\" || removeContainer $CONTAINER_NAME - - docker cp $CONTAINER_NAME:/config/\\"\${MSP_NAME}\\"anchors.tx \\"$ANCHOR_PEER_UPDATE_PATH\\" || removeContainer $CONTAINER_NAME - - removeContainer $CONTAINER_NAME -} - -notifyOrgAboutNewChannel() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -notifyOrgAboutNewChannelTls() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local PEER_ADDRESS=$4 - local ORDERER_URL=$5 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - local CA_CERT=\\"/var/hyperledger/cli/\\"\${6} - - echo \\"Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"MSP_NAME: $MSP_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel update \\\\ - -c \\"$CHANNEL_NAME\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -f \\"$ANCHOR_PEER_UPDATE_PATH\\" \\\\ - --tls --cafile \\"$CA_CERT\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -deleteNewChannelUpdateTx() { - local CHANNEL_NAME=$1 - local MSP_NAME=$2 - local CLI_NAME=$3 - local ANCHOR_PEER_UPDATE_PATH=\\"/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx\\" - - echo \\"Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME\\" - inputLogShort \\"CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH\\" - - if [ -n \\"$ANCHOR_PEER_UPDATE_PATH\\" ]; then - docker exec \\"$CLI_NAME\\" rm \\"$ANCHOR_PEER_UPDATE_PATH\\" - else - echo \\"channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH\\" - fi -} - -printHeadline() { - bold=$'\\\\e[1m' - end=$'\\\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf \\"\${bold}============ %b %s %b ==============\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" -} - -printItalics() { - italics=$'\\\\e[3m' - end=$'\\\\e[0m' - - TEXT=$1 - EMOJI=$2 - printf \\"\${italics}==== %b %s %b ====\${end}\\\\n\\" \\"\\\\\\\\$EMOJI\\" \\"$TEXT\\" \\"\\\\\\\\$EMOJI\\" -} - -inputLog() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' - - echo \\"\${darkGray} $1 \${end}\\" -} - -inputLogShort() { - end=$'\\\\e[0m' - darkGray=$'\\\\e[90m' - - echo \\"\${darkGray} $1 \${end}\\" -} - -certsRemove() { - local CERTS_DIR_PATH=$1 - rm -rf \\"$CERTS_DIR_PATH\\" -} - -removeContainer() { - CONTAINER_NAME=$1 - docker rm -f \\"$CONTAINER_NAME\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -printHelp() { - echo \\"Fablo is powered by SoftwareMill\\" - - echo \\"\\" - echo \\"usage: ./fabric-docker.sh \\" - echo \\"\\" - - echo \\"Commands: \\" - echo \\"\\" - echo \\"./fabric-docker.sh up\\" - echo -e \\"\\\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time.\\" - echo -e \\"\\\\t After 'up' commands start/stop are used to manage network and rerun to rerun it\\" - echo \\"\\" - echo \\"./fabric-docker.sh down\\" - echo -e \\"\\\\t Back to empty state - destorys created containers, prunes generated certificates, configs.\\" - echo \\"\\" - echo \\"./fabric-docker.sh start\\" - echo -e \\"\\\\t Starts already created network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh stop\\" - echo -e \\"\\\\t Stops already running network.\\" - echo \\"\\" - echo \\"./fabric-docker.sh reset\\" - echo -e \\"\\\\t Fresh start - it destroys whole network, certs, configs and then reruns everything.\\" - echo \\"\\" - echo \\"./fabric-docker.sh channel --help\\" - echo -e \\"\\\\t Detailed help for channel management scripts.\\" - echo \\"\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash -# phrase \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" is needed in older bash versions ( <4 ) for array expansion. -# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u - -dockerPullIfMissing() { - local IMAGE=\\"$1\\" - if [[ \\"$(docker images -q \\"$IMAGE\\" 2>/dev/null)\\" == \\"\\" ]]; then - docker pull --platform linux/x86_64 \\"$IMAGE\\" - fi -} - -chaincodeBuild() { - local CHAINCODE_NAME=$1 - local CHAINCODE_LANG=$2 - local CHAINCODE_DIR_PATH=$3 - local RECOMMENDED_NODE_VERSION=$4 - - mkdir -p \\"$CHAINCODE_DIR_PATH\\" - - # pull required images upfront in case of arm64 (Apple Silicon) architecture - # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu - if [ \\"$(uname -m)\\" = \\"arm64\\" ]; then - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION\\" - fi - if [ \\"$CHAINCODE_LANG\\" = \\"java\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION\\" - fi - if [ \\"$CHAINCODE_LANG\\" = \\"golang\\" ]; then - dockerPullIfMissing \\"hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION\\" - fi - fi - - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - NODE_VERSION=\\"$(node --version)\\" - - USES_OLD_FABRIC_SHIM=\\"$(jq '.dependencies.\\"fabric-shim\\" | contains(\\"1.4.\\")' \\"$CHAINCODE_DIR_PATH/package.json\\")\\" - if [ \\"$USES_OLD_FABRIC_SHIM\\" == \\"true\\" ]; then - RECOMMENDED_NODE_VERSION=\\"8.9\\" - fi - - if ! echo \\"$NODE_VERSION\\" | grep -q \\"v$RECOMMENDED_NODE_VERSION\\"; then - echo \\"Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)\\" - echo \\"See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md\\" - fi - - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" - - # Default to using npm for installation and build - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) - - fi - -} - -chaincodeInstall() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local CA_CERT=$8 - - echo \\"Installing chaincode on $CHANNEL_NAME...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" -e CHANNEL_NAME=\\"$CHANNEL_NAME\\" \\"$CLI_NAME\\" peer chaincode install \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p \\"/var/hyperledger/cli/$CHAINCODE_NAME/\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} - -chaincodeInstantiate() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo \\"Instantiating chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode instantiate \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} - -chaincodeUpgrade() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CHANNEL_NAME=$3 - local CHAINCODE_NAME=$4 - local CHAINCODE_VERSION=$5 - local CHAINCODE_LANG=$6 - local ORDERER_URL=$7 - local INIT_PARAMS=$8 - local ENDORSEMENT=$9 - local CA_CERT=\${10} - local COLLECTIONS_CONFIG=\${11} - - echo \\"Upgrading chaincode on $CHANNEL_NAME...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_VERSION: $CHAINCODE_VERSION\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG\\" - inputLog \\"INIT_PARAMS: $INIT_PARAMS\\" - inputLog \\"ENDORSEMENT: $ENDORSEMENT\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"ORDERER_URL: $ORDERER_URL\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CA_CERT: $CA_CERT\\" - - local CA_CERT_PARAMS=() - if [ -n \\"$CA_CERT\\" ]; then - CA_CERT_PARAMS=(--tls --cafile \\"/var/hyperledger/cli/$CA_CERT\\") - fi - - local COLLECTIONS_CONFIG_PARAMS=() - if [ -n \\"$COLLECTIONS_CONFIG\\" ]; then - COLLECTIONS_CONFIG_PARAMS=(--collections-config \\"$COLLECTIONS_CONFIG\\") - fi - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer chaincode upgrade \\\\ - -C \\"$CHANNEL_NAME\\" \\\\ - -n \\"$CHAINCODE_NAME\\" \\\\ - -v \\"$CHAINCODE_VERSION\\" \\\\ - -l \\"$CHAINCODE_LANG\\" \\\\ - -p /var/hyperledger/cli/\\"$CHAINCODE_NAME\\"/ \\\\ - -o \\"$ORDERER_URL\\" \\\\ - -c \\"$INIT_PARAMS\\" \\\\ - -P \\"$ENDORSEMENT\\" \\\\ - \\"\${COLLECTIONS_CONFIG_PARAMS[@]+\\"\${COLLECTIONS_CONFIG_PARAMS[@]}\\"}\\" \\\\ - \\"\${CA_CERT_PARAMS[@]+\\"\${CA_CERT_PARAMS[@]}\\"}\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -peerChannelList() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list -} - -peerChannelGetInfo() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" -} - -peerChannelFetchConfig() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ - --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlock() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local TARGET_FILE=\\"$5\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ -} - -#=== TLS equivalents ========================================================= - -peerChannelListTls() { - local CLI_NAME=$1 - local PEER_ADDRESS=$2 - local CA_CERT=$3 - - echo \\"Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel list --tls --cafile \\"$CA_CERT\\" -} - -peerChannelGetInfoTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local PEER_ADDRESS=$3 - local CA_CERT=$4 - - echo \\"Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\"$CLI_NAME\\" peer channel getinfo \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" -} - -peerChannelFetchConfigTls() { - local CHANNEL_NAME=$1 - local CLI_NAME=$2 - local CONFIG_FILE_NAME=$3 - local PEER_ADDRESS=$4 - local CA_CERT=$5 - - echo \\"Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"CONFIG_FILE_NAME: $CONFIG_FILE_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/assets/ - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" chmod 777 /tmp/hyperledger/assets/config_block_before.pb - docker exec \\\\ - -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" configtxlator proto_decode \\\\ - --input /tmp/hyperledger/assets/config_block_before.pb \\\\ - --type common.Block | - jq .data.data[0].payload.data.config >\\"$CONFIG_FILE_NAME\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/assets/ -} - -peerChannelFetchBlockTls() { - local CHANNEL_NAME=\\"$1\\" - local CLI_NAME=\\"$2\\" - local BLOCK_NAME=\\"$3\\" - local PEER_ADDRESS=\\"$4\\" - local CA_CERT=\\"$5\\" - local TARGET_FILE=\\"$6\\" - local TEMP_FILE=\\"/tmp/hyperledger/blocks/$BLOCK_NAME.block\\" - - echo \\"Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS...\\" - inputLog \\"CHANNEL_NAME: $CHANNEL_NAME\\" - inputLog \\"CLI_NAME: $CLI_NAME\\" - inputLog \\"BLOCK_NAME: $BLOCK_NAME\\" - inputLog \\"PEER_ADDRESS: $PEER_ADDRESS\\" - inputLog \\"TARGET_FILE: $TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" mkdir -p /tmp/hyperledger/blocks/ - - docker exec -e CORE_PEER_ADDRESS=\\"$PEER_ADDRESS\\" \\\\ - \\"$CLI_NAME\\" peer channel fetch \\"$BLOCK_NAME\\" \\"$TEMP_FILE\\" \\\\ - -c \\"$CHANNEL_NAME\\" --tls --cafile \\"$CA_CERT\\" - - docker exec \\"$CLI_NAME\\" cat \\"$TEMP_FILE\\" >\\"$TARGET_FILE\\" - - docker exec \\"$CLI_NAME\\" rm -rf /tmp/hyperledger/blocks/ -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -set -eu - -createChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - - local ORDERER_URL=$5 - - local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Creating channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . - - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx - peer channel join -b \\"\${CHANNEL_NAME}\\".block - - rm -rf \\"$DIR_NAME\\" -} - -createChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Creating channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - cp /var/hyperledger/cli/config/\\"$CHANNEL_NAME\\".tx . - - peer channel create -o \\"\${ORDERER_URL}\\" -c \\"\${CHANNEL_NAME}\\" -f ./\\"$CHANNEL_NAME\\".tx --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\".block --tls --cafile \\"$TLS_CA_CERT_PATH\\" - - rm -rf \\"$DIR_NAME\\" -} - -fetchChannelAndJoin() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - - local ORDERER_URL=$5 - - local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Fetching channel with name: \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block - - rm -rf \\"$DIR_NAME\\" -} - -fetchChannelAndJoinTls() { - local CHANNEL_NAME=$1 - - local CORE_PEER_LOCALMSPID=$2 - local CORE_PEER_ADDRESS=$3 - local CORE_PEER_MSPCONFIGPATH=$(realpath \\"$4\\") - local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath \\"$5\\") - local TLS_CA_CERT_PATH=$(realpath \\"$6\\") - local ORDERER_URL=$7 - - local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt - local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key - local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt - - local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS - - echo \\"Fetching channel with name (TLS): \${CHANNEL_NAME}\\" - echo \\" Orderer: $ORDERER_URL\\" - echo \\" CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID\\" - echo \\" CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS\\" - echo \\" CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH\\" - echo \\" TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH\\" - echo \\" CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE\\" - echo \\" CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE\\" - echo \\" CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE\\" - - mkdir \\"$DIR_NAME\\" && cd \\"$DIR_NAME\\" - - peer channel fetch newest -c \\"\${CHANNEL_NAME}\\" --orderer \\"\${ORDERER_URL}\\" --tls --cafile \\"$TLS_CA_CERT_PATH\\" - peer channel join -b \\"\${CHANNEL_NAME}\\"_newest.block --tls --cafile \\"$TLS_CA_CERT_PATH\\" - - rm -rf \\"$DIR_NAME\\" -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -__getOrdererAndPeerNodes() { - echo \\" - orderer0.group1.orderer.example.com - orderer1.group1.orderer.example.com - orderer2.group1.orderer.example.com - peer0.org1.example.com - peer1.org1.example.com - peer0.org2.example.com - peer1.org2.example.com - \\" -} - -__getCASQLiteNodes() { - echo \\" - ca.orderer.example.com - ca.org1.example.com - ca.org2.example.com - \\" -} - -__getCAPostgresNodes() { - echo \\" - \\" -} - -__createSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - backup_dir=\\"\${1:-\\"snapshot-$(date -u +\\"%Y%m%d%H%M%S\\")\\"}\\" - - if [ -d \\"$backup_dir\\" ] && [ \\"$(ls -A \\"$backup_dir\\")\\" ]; then - echo \\"Error: Directory '$backup_dir' already exists and is not empty!\\" - exit 1 - fi - - mkdir -p \\"$backup_dir\\" - cp -R ./fablo-target \\"$backup_dir/\\" - - for node in $(__getCASQLiteNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node\\" - docker cp \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" \\"$backup_dir/$node/fabric-ca-server.db\\" - done - - for node in $(__getCAPostgresNodes); do - echo \\"Saving state of $node...\\" - mkdir -p \\"$backup_dir/$node/pg-data\\" - docker exec \\"$node\\" pg_dump -c --if-exists -U postgres fabriccaserver >\\"$backup_dir/$node/fabriccaserver.sql\\" - done - - for node in $(__getOrdererAndPeerNodes); do - echo \\"Saving state of $node...\\" - docker cp \\"$node:/var/hyperledger/production/\\" \\"$backup_dir/$node/\\" - done -} - -__cloneSnapshot() { - cd \\"$FABLO_NETWORK_ROOT/..\\" - target_dir=\\"$1\\" - hook_cmd=\\"$2\\" - - if [ -d \\"$target_dir/fablo-target\\" ]; then - echo \\"Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network.\\" - exit 1 - fi - - cp -R ./fablo-target \\"$target_dir/fablo-target\\" - - if [ -n \\"$hook_cmd\\" ]; then - echo \\"Executing pre-restore hook: '$hook_cmd'\\" - (cd \\"$target_dir\\" && eval \\"$hook_cmd\\") - fi - - (cd \\"$target_dir/fablo-target/fabric-docker\\" && docker-compose up --no-start) - - for node in $(__getCASQLiteNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/fabric-ca-server.db\\" \\"$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db\\" - fi - done - - for node in $(__getCAPostgresNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/fabriccaserver.sql\\" \\"$node:/docker-entrypoint-initdb.d/fabriccaserver.sql\\" - fi - done - - for node in $(__getOrdererAndPeerNodes); do - echo \\"Restoring $node...\\" - if [ ! -d \\"$node\\" ]; then - echo \\"Warning: Cannot restore '$node', directory does not exist!\\" - else - docker cp \\"./$node/\\" \\"$node:/var/hyperledger/production/\\" - fi - done -} - -createSnapshot() { - (set -eu && __createSnapshot \\"$1\\") -} - -cloneSnapshot() { - (set -eu && __cloneSnapshot \\"$1\\" \\"$2\\") -} -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -"#!/usr/bin/env bash - -# The code from this file was called after Fablo generated Hyperledger Fabric configuration -echo \\"Executing post-generate hook\\" -" -`; - -exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create proper files from samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json 1`] = ` -Array [ - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/.gitignore", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/configtx.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/explorer/config-global.json", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/.env", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/commands-generated.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", - "e2e/__tmp__/samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json.tmpdir/fablo-target/hooks/post-generate.sh", -] -`; diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 6d82629f..fd951b66 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -2498,21 +2498,7 @@ chaincodeBuild() { fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then - if [ \\"$(command -v nvm)\\" != \\"nvm\\" ] && [ -f ~/.nvm/nvm.sh ]; then - # note: \`source ~/.nvm/nvm.sh || true\` seems to not work on some shells (like /bin/zsh on Apple Silicon) - set +e - source ~/.nvm/nvm.sh - set -e - if [ \\"$(command -v nvm)\\" == \\"nvm\\" ]; then - current_dir=\\"$(pwd)\\" - cd \\"$CHAINCODE_DIR_PATH\\" - set +u - nvm install - set -u - cd \\"$current_dir\\" - fi - fi + if [ "$CHAINCODE_LANG" = "node" ]; then NODE_VERSION="$(node --version)" @@ -2526,14 +2512,14 @@ chaincodeBuild() { echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # Default to using npm for installation and build - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) fi } diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 5f1f0edb..70593fcf 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -2362,7 +2362,7 @@ chaincodeBuild() { fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then NODE_VERSION="$(node --version)" @@ -2376,14 +2376,14 @@ chaincodeBuild() { echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # Default to using npm for installation and build - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) fi } diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 49f8c446..687c5c2f 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -4698,7 +4698,7 @@ chaincodeBuild() { fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then NODE_VERSION="$(node --version)" @@ -4712,14 +4712,14 @@ chaincodeBuild() { echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # Default to using npm for installation and build - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) fi } diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index ae5c3a03..a9bcb921 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -5204,7 +5204,7 @@ chaincodeBuild() { fi fi - if [ \\"$CHAINCODE_LANG\\" = \\"node\\" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then NODE_VERSION="$(node --version)" @@ -5218,14 +5218,14 @@ chaincodeBuild() { echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" fi - echo \\"Buiding chaincode '$CHAINCODE_NAME'...\\" - inputLog \\"CHAINCODE_NAME: $CHAINCODE_NAME\\" - inputLog \\"CHAINCODE_LANG: $CHAINCODE_LANG\\" - inputLog \\"CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH\\" - inputLog \\"NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)\\" + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" # Default to using npm for installation and build - (cd \\"$CHAINCODE_DIR_PATH\\" && npm install && npm run build) + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) fi } From 9fcc33ef230c0a2e2c15f65fe626c467b5754013 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Fri, 26 Jul 2024 12:59:09 +0530 Subject: [PATCH 65/83] added capabilityV_2_5 Signed-off-by: Sanket Teli --- src/extend-config/extendGlobal.ts | 7 ++----- src/types/FabloConfigExtended.ts | 12 +++++++++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/extend-config/extendGlobal.ts b/src/extend-config/extendGlobal.ts index 9c2517f8..75cab6fa 100644 --- a/src/extend-config/extendGlobal.ts +++ b/src/extend-config/extendGlobal.ts @@ -8,11 +8,8 @@ const getNetworkCapabilities = (fabricVersion: string): Capabilities => { if (version(fabricVersion).isGreaterOrEqual("2.0.0")) return { channel: "V2_0", orderer: "V2_0", application: "V2_0", isV2: true }; - if (version(fabricVersion).isGreaterOrEqual("1.4.3")) - return { channel: "V1_4_3", orderer: "V1_4_2", application: "V1_4_2", isV2: false }; - - if (version(fabricVersion).isGreaterOrEqual("1.4.2")) - return { channel: "V1_4_2", orderer: "V1_4_2", application: "V1_4_2", isV2: false }; + if (version(fabricVersion).isGreaterOrEqual("2.5.0")) + return { channel: "V2_5", orderer: "V2_5", application: "V2_5", isV2: true }; return { channel: "V1_3", orderer: "V1_1", application: "V1_3", isV2: false }; }; diff --git a/src/types/FabloConfigExtended.ts b/src/types/FabloConfigExtended.ts index f912c689..6473fc70 100644 --- a/src/types/FabloConfigExtended.ts +++ b/src/types/FabloConfigExtended.ts @@ -22,7 +22,17 @@ interface CapabilitiesV2 { isV2: true; } -export type Capabilities = CapabilitiesV1 | CapabilitiesV2; + +interface CapabilitiesV_2_5 { + application: "V2_5"; + channel: "V2_5"; + orderer: "V2_5"; + isV2: true; +} + + + +export type Capabilities = CapabilitiesV1 | CapabilitiesV2 | CapabilitiesV_2_5; export interface Global extends FabricVersions { tls: boolean; From 5773b2d19aec9663dc4caf959d969180c0c638a2 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Thu, 1 Aug 2024 13:16:45 +0530 Subject: [PATCH 66/83] dropped the interface for version 1 capabilities Signed-off-by: Sanket Teli --- src/extend-config/extendGlobal.ts | 6 ++---- src/types/FabloConfigExtended.ts | 9 +-------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/extend-config/extendGlobal.ts b/src/extend-config/extendGlobal.ts index 75cab6fa..a81e870a 100644 --- a/src/extend-config/extendGlobal.ts +++ b/src/extend-config/extendGlobal.ts @@ -5,13 +5,11 @@ import { GlobalJson } from "../types/FabloConfigJson"; import defaults from "./defaults"; const getNetworkCapabilities = (fabricVersion: string): Capabilities => { - if (version(fabricVersion).isGreaterOrEqual("2.0.0")) - return { channel: "V2_0", orderer: "V2_0", application: "V2_0", isV2: true }; - + if (version(fabricVersion).isGreaterOrEqual("2.5.0")) return { channel: "V2_5", orderer: "V2_5", application: "V2_5", isV2: true }; - return { channel: "V1_3", orderer: "V1_1", application: "V1_3", isV2: false }; + return { channel: "V2_0", orderer: "V2_0", application: "V2_0", isV2: true }; }; const getVersions = (fabricVersion: string): FabricVersions => { diff --git a/src/types/FabloConfigExtended.ts b/src/types/FabloConfigExtended.ts index 6473fc70..ade5af33 100644 --- a/src/types/FabloConfigExtended.ts +++ b/src/types/FabloConfigExtended.ts @@ -8,13 +8,6 @@ export interface FabricVersions { fabricRecommendedNodeVersion: string; } -interface CapabilitiesV1 { - application: "V1_3" | "V1_4_2"; - channel: "V1_3" | "V1_4_2" | "V1_4_3"; - orderer: "V1_1" | "V1_4_2"; - isV2: false; -} - interface CapabilitiesV2 { application: "V2_0"; channel: "V2_0"; @@ -32,7 +25,7 @@ interface CapabilitiesV_2_5 { -export type Capabilities = CapabilitiesV1 | CapabilitiesV2 | CapabilitiesV_2_5; +export type Capabilities = CapabilitiesV2 | CapabilitiesV_2_5; export interface Global extends FabricVersions { tls: boolean; From e32ba84cd8aee757e89e8e40e6b9973b8c00b4f9 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Wed, 7 Aug 2024 17:39:00 +0530 Subject: [PATCH 67/83] updated the docker compose command Signed-off-by: Sanket Teli --- ...g-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap | 8 ++++---- .../fablo-config-hlf2-1org-1chaincode.json.test.ts.snap | 8 ++++---- ...o-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 8 ++++---- ...-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap | 8 ++++---- .../templates/fabric-docker/commands-generated.sh | 6 +++--- .../templates/fabric-docker/snapshot-scripts.sh | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index fd951b66..91103b2e 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1705,7 +1705,7 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) sleep 4 } @@ -1831,13 +1831,13 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -3215,7 +3215,7 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 70593fcf..24a92f05 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1655,7 +1655,7 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) sleep 4 } @@ -1786,13 +1786,13 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -3080,7 +3080,7 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 687c5c2f..ae98f511 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -3483,7 +3483,7 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) sleep 4 } @@ -3717,13 +3717,13 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -5423,7 +5423,7 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index a9bcb921..0c017261 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -3821,7 +3821,7 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) sleep 4 } @@ -3979,13 +3979,13 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -5935,7 +5935,7 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." diff --git a/src/setup-docker/templates/fabric-docker/commands-generated.sh b/src/setup-docker/templates/fabric-docker/commands-generated.sh index 7c90248a..8068e00e 100644 --- a/src/setup-docker/templates/fabric-docker/commands-generated.sh +++ b/src/setup-docker/templates/fabric-docker/commands-generated.sh @@ -23,7 +23,7 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) sleep 4 } @@ -209,13 +209,13 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) printf "Removing chaincode containers & images... \U1F5D1 \n" <% chaincodes.forEach((chaincode) => { -%> diff --git a/src/setup-docker/templates/fabric-docker/snapshot-scripts.sh b/src/setup-docker/templates/fabric-docker/snapshot-scripts.sh index c7b3f3ac..8ba0c648 100644 --- a/src/setup-docker/templates/fabric-docker/snapshot-scripts.sh +++ b/src/setup-docker/templates/fabric-docker/snapshot-scripts.sh @@ -76,7 +76,7 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) + (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." From 600481eb7a0e19eb2a5f2160f7b646fcd2f57bbe Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Fri, 2 Aug 2024 20:29:30 +0530 Subject: [PATCH 68/83] removed the unused templates Signed-off-by: Sanket Teli --- e2e/__snapshots__/extendConfig.test.ts.snap | 16 ++++---- ...1chaincode-raft-explorer.json.test.ts.snap | 4 ++ ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 4 ++ ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 4 ++ ...1chaincode-raft-explorer.json.test.ts.snap | 4 ++ e2e/__snapshots__/fabloCommands.test.ts.snap | 22 +++++------ .../fablo-config-hlf2-1org-1chaincode.json | 2 +- .../fabric-docker/commands-generated.sh | 4 +- .../chaincode-install-v1.4.sh | 39 ------------------- .../chaincode-upgrade-v1.4.sh | 39 ------------------- 10 files changed, 37 insertions(+), 101 deletions(-) delete mode 100644 src/setup-docker/templates/fabric-docker/commands-generated/chaincode-install-v1.4.sh delete mode 100644 src/setup-docker/templates/fabric-docker/commands-generated/chaincode-upgrade-v1.4.sh diff --git a/e2e/__snapshots__/extendConfig.test.ts.snap b/e2e/__snapshots__/extendConfig.test.ts.snap index b9dab976..b906f8d7 100644 --- a/e2e/__snapshots__/extendConfig.test.ts.snap +++ b/e2e/__snapshots__/extendConfig.test.ts.snap @@ -573,19 +573,19 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` ], "global": { "capabilities": { - "application": "V2_0", - "channel": "V2_0", + "application": "V2_5", + "channel": "V2_5", "isV2": true, - "orderer": "V2_0", + "orderer": "V2_5", }, "engine": "docker", - "fabricBaseosVersion": "2.4.7", + "fabricBaseosVersion": "2.5.9", "fabricCaVersion": "1.5.5", - "fabricCcenvVersion": "2.4.7", - "fabricJavaenvVersion": "2.4", - "fabricNodeenvVersion": "2.4", + "fabricCcenvVersion": "2.5.9", + "fabricJavaenvVersion": "2.5", + "fabricNodeenvVersion": "2.5", "fabricRecommendedNodeVersion": "16", - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "monitoring": { "loglevel": "info", }, diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 91103b2e..345f50b5 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1,5 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +<<<<<<< HEAD exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "/config /crypto-config @@ -3295,3 +3296,6 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/hooks/post-generate.sh", ] `; +======= +exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper files from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = `[]`; +>>>>>>> 93ccee8 (removed the unused templates) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 24a92f05..3f22aabe 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1,5 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +<<<<<<< HEAD exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` "/config /crypto-config @@ -3156,3 +3157,6 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper fil "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/hooks/post-generate.sh", ] `; +======= +exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper files from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = `[]`; +>>>>>>> 93ccee8 (removed the unused templates) diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index ae98f511..5b7455fd 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -1,5 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +<<<<<<< HEAD exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "/config /crypto-config @@ -5509,3 +5510,6 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/hooks/post-generate.sh", ] `; +======= +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper files from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = `[]`; +>>>>>>> 93ccee8 (removed the unused templates) diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 0c017261..6412401a 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -1,5 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +<<<<<<< HEAD exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "/config /crypto-config @@ -6023,3 +6024,6 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr "e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/hooks/post-generate.sh", ] `; +======= +exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper files from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = `[]`; +>>>>>>> 93ccee8 (removed the unused templates) diff --git a/e2e/__snapshots__/fabloCommands.test.ts.snap b/e2e/__snapshots__/fabloCommands.test.ts.snap index bfdf6f6c..e56d710d 100644 --- a/e2e/__snapshots__/fabloCommands.test.ts.snap +++ b/e2e/__snapshots__/fabloCommands.test.ts.snap @@ -2427,15 +2427,15 @@ Validation warnings count: 0 =========================================================== { "global": { - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "tls": false, "engine": "docker", "peerDevMode": false, "fabricCaVersion": "1.5.5", - "fabricCcenvVersion": "2.4.7", - "fabricBaseosVersion": "2.4.7", - "fabricJavaenvVersion": "2.4", - "fabricNodeenvVersion": "2.4", + "fabricCcenvVersion": "2.5.9", + "fabricBaseosVersion": "2.5.9", + "fabricJavaenvVersion": "2.5", + "fabricNodeenvVersion": "2.5", "fabricRecommendedNodeVersion": "16", "paths": { "fabloConfig": "", @@ -2445,9 +2445,9 @@ Validation warnings count: 0 "loglevel": "info" }, "capabilities": { - "channel": "V2_0", - "orderer": "V2_0", - "application": "V2_0", + "channel": "V2_5", + "orderer": "V2_5", + "application": "V2_5", "isV2": true }, "tools": {} @@ -2909,7 +2909,7 @@ exports[`init should init simple fablo config 1`] = ` "{ "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "tls": false, "engine": "docker", "peerDevMode": false @@ -2963,7 +2963,7 @@ exports[`init should init simple fablo config with node chaincode 1`] = ` "{ "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "tls": false, "engine": "docker", "peerDevMode": false @@ -3025,7 +3025,7 @@ exports[`init should init simple fablo config with node chaincode and rest api 1 "{ "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "tls": false, "engine": "docker", "peerDevMode": false diff --git a/samples/fablo-config-hlf2-1org-1chaincode.json b/samples/fablo-config-hlf2-1org-1chaincode.json index 2aecb739..2188ecbd 100644 --- a/samples/fablo-config-hlf2-1org-1chaincode.json +++ b/samples/fablo-config-hlf2-1org-1chaincode.json @@ -1,7 +1,7 @@ { "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "tls": false }, "orgs": [ diff --git a/src/setup-docker/templates/fabric-docker/commands-generated.sh b/src/setup-docker/templates/fabric-docker/commands-generated.sh index 8068e00e..08b9d472 100644 --- a/src/setup-docker/templates/fabric-docker/commands-generated.sh +++ b/src/setup-docker/templates/fabric-docker/commands-generated.sh @@ -83,9 +83,7 @@ installChaincodes() { local version="<%= chaincode.version %>" <%- include('commands-generated/chaincode-install-v2.sh', { chaincode, global }); -%> <% } -%> - <% } else { -%> - <%- include('commands-generated/chaincode-install-v1.4.sh', { chaincode, global }); -%> - <% } -%> + <% } else echo "Warning! Skipping chaincode '<%= chaincode.name %>' installation. Chaincode directory is empty." echo "Looked in dir: '$CHAINCODES_BASE_DIR/<%= chaincode.directory %>'" diff --git a/src/setup-docker/templates/fabric-docker/commands-generated/chaincode-install-v1.4.sh b/src/setup-docker/templates/fabric-docker/commands-generated/chaincode-install-v1.4.sh deleted file mode 100644 index cd1ac0e3..00000000 --- a/src/setup-docker/templates/fabric-docker/commands-generated/chaincode-install-v1.4.sh +++ /dev/null @@ -1,39 +0,0 @@ -<%/* - Chaincode install for V1 capabilities. - - Required template parameters: - - chaincode - - global -*/-%> -chaincodeBuild <% -%> - "<%= chaincode.name %>" <% -%> - "<%= chaincode.lang %>" <% -%> - "$CHAINCODES_BASE_DIR/<%= chaincode.directory %>" <% -%> - "<%= global.fabricRecommendedNodeVersion %>" -<% chaincode.channel.orgs.forEach((org) => { -%> - <% org.peers.forEach((peer) => { -%> - printHeadline "Installing '<%= chaincode.name %>' on <%= chaincode.channel.name %>/<%= org.name %>/<%= peer.name %>" "U1F60E" - chaincodeInstall <% -%> - "<%= org.cli.address %>" <% -%> - "<%= peer.fullAddress %>" <% -%> - "<%= chaincode.channel.name %>" <% -%> - "<%= chaincode.name %>" <% -%> - "<%= chaincode.version %>" <% -%> - "<%= chaincode.lang %>" <% -%> - "<%= chaincode.channel.ordererHead.fullAddress %>" <% -%> - "<%= !global.tls ? '' : `crypto-orderer/tlsca.${chaincode.channel.ordererHead.domain}-cert.pem` %>" - <% }) -%> -<% }) -%> -printItalics "Instantiating chaincode '<%= chaincode.name %>' on channel '<%= chaincode.channel.name %>' as '<%= chaincode.instantiatingOrg.name %>'" "U1F618" -chaincodeInstantiate <% -%> - "<%= chaincode.instantiatingOrg.cli.address %>" <% -%> - "<%= chaincode.instantiatingOrg.headPeer.fullAddress %>" <% -%> - "<%= chaincode.channel.name %>" <% -%> - "<%= chaincode.name %>" <% -%> - "<%= chaincode.version %>" <% -%> - "<%= chaincode.lang %>" <% -%> - "<%= chaincode.channel.ordererHead.fullAddress %>" <% -%> - '<%- chaincode.init %>' <% -%> - "<%- chaincode.endorsement %>" <% -%> - "<%= !global.tls ? '' : `crypto-orderer/tlsca.${chaincode.channel.ordererHead.domain}-cert.pem` %>" <% -%> - "<%= chaincode.privateDataConfigFile || '' %>" diff --git a/src/setup-docker/templates/fabric-docker/commands-generated/chaincode-upgrade-v1.4.sh b/src/setup-docker/templates/fabric-docker/commands-generated/chaincode-upgrade-v1.4.sh deleted file mode 100644 index 89777ad4..00000000 --- a/src/setup-docker/templates/fabric-docker/commands-generated/chaincode-upgrade-v1.4.sh +++ /dev/null @@ -1,39 +0,0 @@ -<%/* - Upgrade chaincode for V1 capabilities. - - Required bash variables: - - version - Required template parameters: - - chaincode - - global -*/-%> -chaincodeBuild <% -%> - "<%= chaincode.name %>" <% -%> - "<%= chaincode.lang %>" <% -%> - "$CHAINCODES_BASE_DIR/<%= chaincode.directory %>" -<% chaincode.channel.orgs.forEach((org) => { -%> - <% org.peers.forEach((peer) => { %> - printHeadline "Installing '<%= chaincode.name %>' on <%= chaincode.channel.name %>/<%= org.name %>/<%= peer.name %>" "U1F60E" - chaincodeInstall <% -%> - "<%= org.cli.address %>" <% -%> - "<%= peer.fullAddress %>" <% -%> - "<%= chaincode.channel.name %>" <% -%> - "<%= chaincode.name %>" <% -%> - "$version" <% -%> - "<%= chaincode.lang %>" <% -%> - "<%= chaincode.channel.ordererHead.fullAddress %>" <% -%> - "<%= !global.tls ? '' : `crypto-orderer/tlsca.${chaincode.channel.ordererHead.domain}-cert.pem` %>" - <% }) -%> -<% }) -%> -printItalics "Upgrading as '<%= chaincode.instantiatingOrg.name %>'. '<%= chaincode.name %>' on channel '<%= chaincode.channel.name %>'" "U1F618" -chaincodeUpgrade <% -%> - "<%= chaincode.instantiatingOrg.cli.address %>" <% -%> - "<%= chaincode.instantiatingOrg.headPeer.fullAddress %>" <% -%> - "<%= chaincode.channel.name %>" "<%= chaincode.name %>" <% -%> - "$version" <% -%> - "<%= chaincode.lang %>" <% -%> - "<%= chaincode.channel.ordererHead.fullAddress %>" <% -%> - '<%- chaincode.init %>' <% -%> - "<%- chaincode.endorsement %>" <% -%> - "<%= !global.tls ? '' : `crypto-orderer/tlsca.${chaincode.channel.ordererHead.domain}-cert.pem` %>" <% -%> - "<%= chaincode.privateDataConfigFile || '' %>" From c5a5be83154c7a3d4e7eaddaa569496350fca292 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Fri, 2 Aug 2024 20:48:12 +0530 Subject: [PATCH 69/83] resolved the error Signed-off-by: Sanket Teli --- ...1chaincode-raft-explorer.json.test.ts.snap | 22 ++++++++++ ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 40 +++++++++++++++++++ ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 22 ++++++++++ ...1chaincode-raft-explorer.json.test.ts.snap | 22 ++++++++++ .../fabric-docker/commands-generated.sh | 2 +- 5 files changed, 107 insertions(+), 1 deletion(-) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 345f50b5..59b2e099 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1,6 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 7a0da9f (resolved the error) exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "/config /crypto-config @@ -1706,7 +1709,11 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) +>>>>>>> 7a0da9f (resolved the error) sleep 4 } @@ -1832,13 +1839,21 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) +>>>>>>> 7a0da9f (resolved the error) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) +>>>>>>> 7a0da9f (resolved the error) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -3216,7 +3231,11 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi +<<<<<<< HEAD (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) +======= + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) +>>>>>>> 7a0da9f (resolved the error) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." @@ -3296,6 +3315,9 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/hooks/post-generate.sh", ] `; +<<<<<<< HEAD ======= exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper files from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = `[]`; >>>>>>> 93ccee8 (removed the unused templates) +======= +>>>>>>> 7a0da9f (resolved the error) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 3f22aabe..70275597 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1,6 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 7a0da9f (resolved the error) exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` "/config /crypto-config @@ -13,11 +16,19 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e ################################################################################ Capabilities: Channel: &ChannelCapabilities +<<<<<<< HEAD V2_0: true Orderer: &OrdererCapabilities V2_0: true Application: &ApplicationCapabilities V2_0: true +======= + V2_5: true + Orderer: &OrdererCapabilities + V2_5: true + Application: &ApplicationCapabilities + V2_5: true +>>>>>>> 7a0da9f (resolved the error) ################################################################################ # CHANNEL Defaults @@ -1449,6 +1460,7 @@ CHAINCODES_BASE_DIR= COMPOSE_PROJECT_NAME= LOGGING_LEVEL=info +<<<<<<< HEAD FABRIC_VERSION=2.4.7 FABRIC_CA_VERSION=1.5.5 FABRIC_CA_POSTGRES_VERSION=14 @@ -1456,6 +1468,15 @@ FABRIC_CCENV_VERSION=2.4.7 FABRIC_BASEOS_VERSION=2.4.7 FABRIC_JAVAENV_VERSION=2.4 FABRIC_NODEENV_VERSION=2.4 +======= +FABRIC_VERSION=2.5.9 +FABRIC_CA_VERSION=1.5.5 +FABRIC_CA_POSTGRES_VERSION=14 +FABRIC_CCENV_VERSION=2.5.9 +FABRIC_BASEOS_VERSION=2.5.9 +FABRIC_JAVAENV_VERSION=2.5 +FABRIC_NODEENV_VERSION=2.5 +>>>>>>> 7a0da9f (resolved the error) RECOMMENDED_NODE_VERSION=16 ROOT_CA_ADMIN_NAME=admin @@ -1656,7 +1677,11 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) +>>>>>>> 7a0da9f (resolved the error) sleep 4 } @@ -1787,13 +1812,21 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) +>>>>>>> 7a0da9f (resolved the error) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) +>>>>>>> 7a0da9f (resolved the error) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -3081,7 +3114,11 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi +<<<<<<< HEAD (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) +======= + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) +>>>>>>> 7a0da9f (resolved the error) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." @@ -3157,6 +3194,9 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper fil "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/hooks/post-generate.sh", ] `; +<<<<<<< HEAD ======= exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper files from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = `[]`; >>>>>>> 93ccee8 (removed the unused templates) +======= +>>>>>>> 7a0da9f (resolved the error) diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 5b7455fd..114c5d86 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -1,6 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 7a0da9f (resolved the error) exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "/config /crypto-config @@ -3484,7 +3487,11 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) +>>>>>>> 7a0da9f (resolved the error) sleep 4 } @@ -3718,13 +3725,21 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) +>>>>>>> 7a0da9f (resolved the error) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) +>>>>>>> 7a0da9f (resolved the error) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -5424,7 +5439,11 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi +<<<<<<< HEAD (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) +======= + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) +>>>>>>> 7a0da9f (resolved the error) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." @@ -5510,6 +5529,9 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/hooks/post-generate.sh", ] `; +<<<<<<< HEAD ======= exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper files from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = `[]`; >>>>>>> 93ccee8 (removed the unused templates) +======= +>>>>>>> 7a0da9f (resolved the error) diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 6412401a..8060bffb 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -1,6 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP <<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 7a0da9f (resolved the error) exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "/config /crypto-config @@ -3822,7 +3825,11 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) +>>>>>>> 7a0da9f (resolved the error) sleep 4 } @@ -3980,13 +3987,21 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) +>>>>>>> 7a0da9f (resolved the error) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" +<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) +======= + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) +>>>>>>> 7a0da9f (resolved the error) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -5936,7 +5951,11 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi +<<<<<<< HEAD (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) +======= + (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) +>>>>>>> 7a0da9f (resolved the error) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." @@ -6024,6 +6043,9 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr "e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/hooks/post-generate.sh", ] `; +<<<<<<< HEAD ======= exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper files from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = `[]`; >>>>>>> 93ccee8 (removed the unused templates) +======= +>>>>>>> 7a0da9f (resolved the error) diff --git a/src/setup-docker/templates/fabric-docker/commands-generated.sh b/src/setup-docker/templates/fabric-docker/commands-generated.sh index 08b9d472..8a314211 100644 --- a/src/setup-docker/templates/fabric-docker/commands-generated.sh +++ b/src/setup-docker/templates/fabric-docker/commands-generated.sh @@ -83,7 +83,7 @@ installChaincodes() { local version="<%= chaincode.version %>" <%- include('commands-generated/chaincode-install-v2.sh', { chaincode, global }); -%> <% } -%> - <% } + <% } -%> else echo "Warning! Skipping chaincode '<%= chaincode.name %>' installation. Chaincode directory is empty." echo "Looked in dir: '$CHAINCODES_BASE_DIR/<%= chaincode.directory %>'" From 509fdd92e944149954347ac37d1eb0af4b2e8e6b Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Tue, 6 Aug 2024 12:13:28 +0530 Subject: [PATCH 70/83] some minor fixes regarding fabric_version Signed-off-by: Sanket Teli --- e2e/__snapshots__/extendConfig.test.ts.snap | 16 +++++++------- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 20 ++++++++++++++++- e2e/__snapshots__/fabloCommands.test.ts.snap | 22 +++++++++---------- .../fablo-config-hlf2-1org-1chaincode.json | 2 +- 4 files changed, 39 insertions(+), 21 deletions(-) diff --git a/e2e/__snapshots__/extendConfig.test.ts.snap b/e2e/__snapshots__/extendConfig.test.ts.snap index b906f8d7..b9dab976 100644 --- a/e2e/__snapshots__/extendConfig.test.ts.snap +++ b/e2e/__snapshots__/extendConfig.test.ts.snap @@ -573,19 +573,19 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` ], "global": { "capabilities": { - "application": "V2_5", - "channel": "V2_5", + "application": "V2_0", + "channel": "V2_0", "isV2": true, - "orderer": "V2_5", + "orderer": "V2_0", }, "engine": "docker", - "fabricBaseosVersion": "2.5.9", + "fabricBaseosVersion": "2.4.7", "fabricCaVersion": "1.5.5", - "fabricCcenvVersion": "2.5.9", - "fabricJavaenvVersion": "2.5", - "fabricNodeenvVersion": "2.5", + "fabricCcenvVersion": "2.4.7", + "fabricJavaenvVersion": "2.4", + "fabricNodeenvVersion": "2.4", "fabricRecommendedNodeVersion": "16", - "fabricVersion": "2.5.9", + "fabricVersion": "2.4.7", "monitoring": { "loglevel": "info", }, diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 70275597..411618a6 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -16,6 +16,7 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e ################################################################################ Capabilities: Channel: &ChannelCapabilities +<<<<<<< HEAD <<<<<<< HEAD V2_0: true Orderer: &OrdererCapabilities @@ -24,11 +25,18 @@ Capabilities: V2_0: true ======= V2_5: true +======= + V2_0: true +>>>>>>> fbcd816 (some minor fixes regarding fabric_version) Orderer: &OrdererCapabilities - V2_5: true + V2_0: true Application: &ApplicationCapabilities +<<<<<<< HEAD V2_5: true >>>>>>> 7a0da9f (resolved the error) +======= + V2_0: true +>>>>>>> fbcd816 (some minor fixes regarding fabric_version) ################################################################################ # CHANNEL Defaults @@ -1460,6 +1468,7 @@ CHAINCODES_BASE_DIR= COMPOSE_PROJECT_NAME= LOGGING_LEVEL=info +<<<<<<< HEAD <<<<<<< HEAD FABRIC_VERSION=2.4.7 FABRIC_CA_VERSION=1.5.5 @@ -1477,6 +1486,15 @@ FABRIC_BASEOS_VERSION=2.5.9 FABRIC_JAVAENV_VERSION=2.5 FABRIC_NODEENV_VERSION=2.5 >>>>>>> 7a0da9f (resolved the error) +======= +FABRIC_VERSION=2.4.7 +FABRIC_CA_VERSION=1.5.5 +FABRIC_CA_POSTGRES_VERSION=14 +FABRIC_CCENV_VERSION=2.4.7 +FABRIC_BASEOS_VERSION=2.4.7 +FABRIC_JAVAENV_VERSION=2.4 +FABRIC_NODEENV_VERSION=2.4 +>>>>>>> fbcd816 (some minor fixes regarding fabric_version) RECOMMENDED_NODE_VERSION=16 ROOT_CA_ADMIN_NAME=admin diff --git a/e2e/__snapshots__/fabloCommands.test.ts.snap b/e2e/__snapshots__/fabloCommands.test.ts.snap index e56d710d..bfdf6f6c 100644 --- a/e2e/__snapshots__/fabloCommands.test.ts.snap +++ b/e2e/__snapshots__/fabloCommands.test.ts.snap @@ -2427,15 +2427,15 @@ Validation warnings count: 0 =========================================================== { "global": { - "fabricVersion": "2.5.9", + "fabricVersion": "2.4.7", "tls": false, "engine": "docker", "peerDevMode": false, "fabricCaVersion": "1.5.5", - "fabricCcenvVersion": "2.5.9", - "fabricBaseosVersion": "2.5.9", - "fabricJavaenvVersion": "2.5", - "fabricNodeenvVersion": "2.5", + "fabricCcenvVersion": "2.4.7", + "fabricBaseosVersion": "2.4.7", + "fabricJavaenvVersion": "2.4", + "fabricNodeenvVersion": "2.4", "fabricRecommendedNodeVersion": "16", "paths": { "fabloConfig": "", @@ -2445,9 +2445,9 @@ Validation warnings count: 0 "loglevel": "info" }, "capabilities": { - "channel": "V2_5", - "orderer": "V2_5", - "application": "V2_5", + "channel": "V2_0", + "orderer": "V2_0", + "application": "V2_0", "isV2": true }, "tools": {} @@ -2909,7 +2909,7 @@ exports[`init should init simple fablo config 1`] = ` "{ "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.5.9", + "fabricVersion": "2.4.7", "tls": false, "engine": "docker", "peerDevMode": false @@ -2963,7 +2963,7 @@ exports[`init should init simple fablo config with node chaincode 1`] = ` "{ "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.5.9", + "fabricVersion": "2.4.7", "tls": false, "engine": "docker", "peerDevMode": false @@ -3025,7 +3025,7 @@ exports[`init should init simple fablo config with node chaincode and rest api 1 "{ "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.5.9", + "fabricVersion": "2.4.7", "tls": false, "engine": "docker", "peerDevMode": false diff --git a/samples/fablo-config-hlf2-1org-1chaincode.json b/samples/fablo-config-hlf2-1org-1chaincode.json index 2188ecbd..2aecb739 100644 --- a/samples/fablo-config-hlf2-1org-1chaincode.json +++ b/samples/fablo-config-hlf2-1org-1chaincode.json @@ -1,7 +1,7 @@ { "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.5.9", + "fabricVersion": "2.4.7", "tls": false }, "orgs": [ From 8241083dabfbc83c559cb42865d796e730170491 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Tue, 6 Aug 2024 13:06:14 +0530 Subject: [PATCH 71/83] removed all the version 1.4 templates Signed-off-by: Sanket Teli --- src/setup-docker/templates/fabric-docker/commands-generated.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/setup-docker/templates/fabric-docker/commands-generated.sh b/src/setup-docker/templates/fabric-docker/commands-generated.sh index 8a314211..94649a53 100644 --- a/src/setup-docker/templates/fabric-docker/commands-generated.sh +++ b/src/setup-docker/templates/fabric-docker/commands-generated.sh @@ -104,8 +104,6 @@ installChaincode() { if [ -n "$(ls "$CHAINCODES_BASE_DIR/<%= chaincode.directory %>")" ]; then <% if (global.capabilities.isV2) { -%> <%- include('commands-generated/chaincode-install-v2.sh', { chaincode, global }); %> - <% } else { -%> - <%- include('commands-generated/chaincode-install-v1.4.sh', { chaincode, global }); %> <% } -%> else echo "Warning! Skipping chaincode '<%= chaincode.name %>' install. Chaincode directory is empty." From 0c7c081e480ff082a8ebb253005fdddf531c9420 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Wed, 7 Aug 2024 18:17:08 +0530 Subject: [PATCH 72/83] rebase and updated the snapshots Signed-off-by: Sanket Teli --- ...1chaincode-raft-explorer.json.test.ts.snap | 26 -------- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 62 ------------------- ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 26 -------- ...1chaincode-raft-explorer.json.test.ts.snap | 26 -------- 4 files changed, 140 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 59b2e099..91103b2e 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -1,9 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 7a0da9f (resolved the error) exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = ` "/config /crypto-config @@ -1709,11 +1705,7 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) ->>>>>>> 7a0da9f (resolved the error) sleep 4 } @@ -1839,21 +1831,13 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) ->>>>>>> 7a0da9f (resolved the error) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) ->>>>>>> 7a0da9f (resolved the error) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -3231,11 +3215,7 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi -<<<<<<< HEAD (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) -======= - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) ->>>>>>> 7a0da9f (resolved the error) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." @@ -3315,9 +3295,3 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.tmpdir/fablo-target/hooks/post-generate.sh", ] `; -<<<<<<< HEAD -======= -exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should create proper files from samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json 1`] = `[]`; ->>>>>>> 93ccee8 (removed the unused templates) -======= ->>>>>>> 7a0da9f (resolved the error) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 411618a6..24a92f05 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -1,9 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 7a0da9f (resolved the error) exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` "/config /crypto-config @@ -16,27 +12,11 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e ################################################################################ Capabilities: Channel: &ChannelCapabilities -<<<<<<< HEAD -<<<<<<< HEAD V2_0: true Orderer: &OrdererCapabilities V2_0: true Application: &ApplicationCapabilities V2_0: true -======= - V2_5: true -======= - V2_0: true ->>>>>>> fbcd816 (some minor fixes regarding fabric_version) - Orderer: &OrdererCapabilities - V2_0: true - Application: &ApplicationCapabilities -<<<<<<< HEAD - V2_5: true ->>>>>>> 7a0da9f (resolved the error) -======= - V2_0: true ->>>>>>> fbcd816 (some minor fixes regarding fabric_version) ################################################################################ # CHANNEL Defaults @@ -1468,25 +1448,6 @@ CHAINCODES_BASE_DIR= COMPOSE_PROJECT_NAME= LOGGING_LEVEL=info -<<<<<<< HEAD -<<<<<<< HEAD -FABRIC_VERSION=2.4.7 -FABRIC_CA_VERSION=1.5.5 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=2.4.7 -FABRIC_BASEOS_VERSION=2.4.7 -FABRIC_JAVAENV_VERSION=2.4 -FABRIC_NODEENV_VERSION=2.4 -======= -FABRIC_VERSION=2.5.9 -FABRIC_CA_VERSION=1.5.5 -FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=2.5.9 -FABRIC_BASEOS_VERSION=2.5.9 -FABRIC_JAVAENV_VERSION=2.5 -FABRIC_NODEENV_VERSION=2.5 ->>>>>>> 7a0da9f (resolved the error) -======= FABRIC_VERSION=2.4.7 FABRIC_CA_VERSION=1.5.5 FABRIC_CA_POSTGRES_VERSION=14 @@ -1494,7 +1455,6 @@ FABRIC_CCENV_VERSION=2.4.7 FABRIC_BASEOS_VERSION=2.4.7 FABRIC_JAVAENV_VERSION=2.4 FABRIC_NODEENV_VERSION=2.4 ->>>>>>> fbcd816 (some minor fixes regarding fabric_version) RECOMMENDED_NODE_VERSION=16 ROOT_CA_ADMIN_NAME=admin @@ -1695,11 +1655,7 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) ->>>>>>> 7a0da9f (resolved the error) sleep 4 } @@ -1830,21 +1786,13 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) ->>>>>>> 7a0da9f (resolved the error) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) ->>>>>>> 7a0da9f (resolved the error) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -3132,11 +3080,7 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi -<<<<<<< HEAD (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) -======= - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) ->>>>>>> 7a0da9f (resolved the error) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." @@ -3212,9 +3156,3 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper fil "e2e/__tmp__/samples/fablo-config-hlf2-1org-1chaincode.json.tmpdir/fablo-target/hooks/post-generate.sh", ] `; -<<<<<<< HEAD -======= -exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper files from samples/fablo-config-hlf2-1org-1chaincode.json 1`] = `[]`; ->>>>>>> 93ccee8 (removed the unused templates) -======= ->>>>>>> 7a0da9f (resolved the error) diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 114c5d86..ae98f511 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -1,9 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 7a0da9f (resolved the error) exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` "/config /crypto-config @@ -3487,11 +3483,7 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) ->>>>>>> 7a0da9f (resolved the error) sleep 4 } @@ -3725,21 +3717,13 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) ->>>>>>> 7a0da9f (resolved the error) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) ->>>>>>> 7a0da9f (resolved the error) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -5439,11 +5423,7 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi -<<<<<<< HEAD (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) -======= - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) ->>>>>>> 7a0da9f (resolved the error) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." @@ -5529,9 +5509,3 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.tmpdir/fablo-target/hooks/post-generate.sh", ] `; -<<<<<<< HEAD -======= -exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create proper files from samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = `[]`; ->>>>>>> 93ccee8 (removed the unused templates) -======= ->>>>>>> 7a0da9f (resolved the error) diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 8060bffb..0c017261 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -1,9 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -<<<<<<< HEAD -<<<<<<< HEAD -======= ->>>>>>> 7a0da9f (resolved the error) exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = ` "/config /crypto-config @@ -3825,11 +3821,7 @@ generateArtifacts() { startNetwork() { printHeadline "Starting network" "U1F680" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose up -d) ->>>>>>> 7a0da9f (resolved the error) sleep 4 } @@ -3987,21 +3979,13 @@ printStartSuccessInfo() { stopNetwork() { printHeadline "Stopping network" "U1F68F" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose stop) ->>>>>>> 7a0da9f (resolved the error) sleep 4 } networkDown() { printHeadline "Destroying network" "U1F916" -<<<<<<< HEAD (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) -======= - (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker-compose down) ->>>>>>> 7a0da9f (resolved the error) printf "Removing chaincode containers & images... \\U1F5D1 \\n" for container in $(docker ps -a | grep "dev-peer0.org1.example.com-chaincode1" | awk '{print $1}'); do @@ -5951,11 +5935,7 @@ __cloneSnapshot() { (cd "$target_dir" && eval "$hook_cmd") fi -<<<<<<< HEAD (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) -======= - (cd "$target_dir/fablo-target/fabric-docker" && docker-compose up --no-start) ->>>>>>> 7a0da9f (resolved the error) for node in $(__getCASQLiteNodes); do echo "Restoring $node..." @@ -6043,9 +6023,3 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr "e2e/__tmp__/samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.tmpdir/fablo-target/hooks/post-generate.sh", ] `; -<<<<<<< HEAD -======= -exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should create proper files from samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json 1`] = `[]`; ->>>>>>> 93ccee8 (removed the unused templates) -======= ->>>>>>> 7a0da9f (resolved the error) From c9a58850657f1ae2939a7898cd3d769d7c342377 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Thu, 8 Aug 2024 11:17:28 +0200 Subject: [PATCH 73/83] Remove redundant utility script Signed-off-by: Jakub Dzikowski --- e2e-network/docker/wait-for-chaincode-v1.4.sh | 35 ------------------- 1 file changed, 35 deletions(-) delete mode 100755 e2e-network/docker/wait-for-chaincode-v1.4.sh diff --git a/e2e-network/docker/wait-for-chaincode-v1.4.sh b/e2e-network/docker/wait-for-chaincode-v1.4.sh deleted file mode 100755 index a7af9daa..00000000 --- a/e2e-network/docker/wait-for-chaincode-v1.4.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash - -cli=$1 -peer=$2 -channel=$3 -chaincode=$4 -version=$5 -search_string="Name: $chaincode, Version: $version" - -if [ -z "$version" ]; then - echo "Usage: ./wait-for-chaincode.sh [cli] [peer:port] [channel] [chaincode] [version]" - exit 1 -fi - -listChaincodes() { - docker exec -e CORE_PEER_ADDRESS="$peer" "$cli" peer chaincode list \ - -C "$channel" \ - --instantiated -} - -for i in $(seq 1 90); do - echo "➜ verifying if chaincode ($chaincode/$version) is instantiated on $channel/$cli/$peer ($i)..." - - if listChaincodes 2>&1 | grep "$search_string"; then - echo "✅ ok: Chaincode $chaincode/$version is ready on $channel/$cli/$peer!" - exit 0 - else - sleep 1 - fi -done - -#timeout -echo "❌ failed: Failed to verify chaincode $chaincode/$version on $channel/$cli/$peer" -listChaincodes -exit 1 From 53421da8dcf6a58b13888bc5726b75d4f63b7b33 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Thu, 8 Aug 2024 11:25:32 +0200 Subject: [PATCH 74/83] Add private data checks Signed-off-by: Jakub Dzikowski --- e2e-network/TEST_CASES.md | 6 +- e2e-network/docker/test-03-private-data.sh | 70 +- e2e/__snapshots__/extendConfig.test.ts.snap | 1413 +++++++++++++++++ ...orgs-2chaincodes-private-data.yaml.test.ts | 7 + ...g-hlf2-2orgs-2chaincodes-private-data.yaml | 58 + 5 files changed, 1514 insertions(+), 40 deletions(-) create mode 100644 e2e/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts create mode 100644 samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml diff --git a/e2e-network/TEST_CASES.md b/e2e-network/TEST_CASES.md index 712e9ba3..247a98de 100644 --- a/e2e-network/TEST_CASES.md +++ b/e2e-network/TEST_CASES.md @@ -2,9 +2,9 @@ | Test case | 01-simple | 02-raft | 03-private | 04-snapshot | | ------------------------- |:---------------:|:-----------:|:----------:|:------------------------:| -| Fabric versions | 2.4.7 | 2.3.2 | 1.4.11 | 2.3.3/2.4.2 | +| Fabric versions | 2.4.7 | 2.3.2 | 2.4.7 | 2.3.3/2.4.2 | | TLS | no | yes | no | yes | -| Channel capabilities | v2 | v2 | v1_4_3 | v2 | +| Channel capabilities | v2 | v2 | v2_5 | v2 | | Consensus | solo | RAFT | solo | RAFT | | Orderer nodes | 1 | 3 | 1 | 1 | | Organizations | 1 | 2 | 2 | 1 | @@ -19,4 +19,4 @@ | Java chaincode | no | yes | no | no | | Go chaincode | no | no | no | no | | Tools | channel scripts | Fablo REST | - | Fablo REST, Explorer | -| Other Fablo commands | init, reset | stop, start | - | snapshot, prune, restore | +| Other Fablo commands | init, reset | stop, start | - | snapshot, prune, restore | diff --git a/e2e-network/docker/test-03-private-data.sh b/e2e-network/docker/test-03-private-data.sh index cefb1b13..027d1e42 100755 --- a/e2e-network/docker/test-03-private-data.sh +++ b/e2e-network/docker/test-03-private-data.sh @@ -6,7 +6,9 @@ TEST_TMP="$(rm -rf "$0.tmpdir" && mkdir -p "$0.tmpdir" && (cd "$0.tmpdir" && pwd TEST_LOGS="$(mkdir -p "$0.logs" && (cd "$0.logs" && pwd))" FABLO_HOME="$TEST_TMP/../../.." -FABLO_CONFIG="$FABLO_HOME/samples/fablo-config-hlf1.4-2orgs-2chaincodes-private-data.yaml" +export FABLO_HOME + +FABLO_CONFIG="$FABLO_HOME/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml" networkUp() { "$FABLO_HOME/fablo-build.sh" @@ -30,11 +32,11 @@ waitForContainer() { } waitForChaincode() { - sh "$TEST_TMP/../wait-for-chaincode-v1.4.sh" "$1" "$2" "$3" "$4" "$5" + (cd "$TEST_TMP" && sh ../wait-for-chaincode.sh "$1" "$2" "$3" "$4") } expectInvoke() { - sh "$TEST_TMP/../expect-invoke-cli.sh" "$1" "$2" "$3" "$4" "$5" "$6" "$7" + (cd "$TEST_TMP" && sh ../expect-invoke-cli.sh "$1" "$2" "$3" "$4" "$5" "$6") } trap networkDown EXIT @@ -44,67 +46,61 @@ trap 'networkDown ; echo "Test failed" ; exit 1' ERR SIGINT networkUp # check if network is ready -waitForContainer "orderer0.group1.orderer.example.com" "Created and starting new chain my-channel1" +waitForContainer "orderer0.group1.orderer.example.com" "Created and started new channel my-channel1" waitForContainer "ca.org1.example.com" "Listening on http://0.0.0.0:7054" waitForContainer "peer0.org1.example.com" "Joining gossip network of channel my-channel1 with 2 organizations" waitForContainer "ca.org2.example.com" "Listening on http://0.0.0.0:7054" waitForContainer "peer0.org2.example.com" "Joining gossip network of channel my-channel1 with 2 organizations" -waitForChaincode "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" -waitForChaincode "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "0.0.1" -waitForChaincode "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" -waitForChaincode "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "0.0.1" +waitForChaincode "peer0.org1.example.com" "my-channel1" "or-policy-chaincode" "0.0.1" +waitForChaincode "peer0.org2.example.com" "my-channel1" "or-policy-chaincode" "0.0.1" +waitForChaincode "peer0.org1.example.com" "my-channel1" "and-policy-chaincode" "0.0.1" +waitForChaincode "peer0.org2.example.com" "my-channel1" "and-policy-chaincode" "0.0.1" sleep 3 # extra time needed: peers need to discover themselves before private data call. # Org1: Test chaincode with transient fields and private data -expectInvoke "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" \ +expectInvoke "peer0.org1.example.com" "my-channel1" "or-policy-chaincode" \ '{"Args":["KVContract:putPrivateMessage", "org1-collection"]}' \ '{\"success\":\"OK\"}' \ '{"message":"VmVyeSBzZWNyZXQgbWVzc2FnZQ=="}' -expectInvoke "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" \ +expectInvoke "peer0.org1.example.com" "my-channel1" "or-policy-chaincode" \ '{"Args":["KVContract:getPrivateMessage", "org1-collection"]}' \ '{\"success\":\"Very secret message\"}' -expectInvoke "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" \ +expectInvoke "peer0.org1.example.com" "my-channel1" "or-policy-chaincode" \ '{"Args":["KVContract:verifyPrivateMessage", "org1-collection"]}' \ '{\"success\":\"OK\"}' \ '{"message":"VmVyeSBzZWNyZXQgbWVzc2FnZQ=="}' # Org2: Access private data from org1-collection -expectInvoke "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" \ +expectInvoke "peer0.org2.example.com" "my-channel1" "or-policy-chaincode" \ '{"Args":["KVContract:verifyPrivateMessage", "org1-collection"]}' \ '{\"success\":\"OK\"}' \ '{"message":"VmVyeSBzZWNyZXQgbWVzc2FnZQ=="}' -expectInvoke "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" \ +expectInvoke "peer0.org2.example.com" "my-channel1" "or-policy-chaincode" \ '{"Args":["KVContract:verifyPrivateMessage", "org1-collection"]}' \ '{\"error\":\"VERIFICATION_FAILED\"}' \ '{"message":"XXXXXSBzZWNyZXQgbWVzc2FnZQ=="}' -expectInvoke "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" \ +expectInvoke "peer0.org2.example.com" "my-channel1" "or-policy-chaincode" \ '{"Args":["KVContract:getPrivateMessage", "org1-collection"]}' \ 'tx creator does not have read access permission on privatedata in chaincodeName:or-policy-chaincode collectionName: org1-collection' - -# Warning: Org2 with no read access can override private data of Org1. -expectInvoke "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" \ +expectInvoke "peer0.org2.example.com" "my-channel1" "or-policy-chaincode" \ '{"Args":["KVContract:putPrivateMessage", "org1-collection"]}' \ - '{\"success\":\"OK\"}' \ + 'tx creator does not have write access permission on privatedata in chaincodeName:or-policy-chaincode collectionName: org1-collection' \ '{"message":"Q29ycnVwdGVkIG1lc3NhZ2U="}' -# Read of corrupted message will fail with MVCC_READ_CONFLICT if the Org1 has one peer in the channel, but succeed otherwise -expectInvoke "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" \ - '{"Args":["KVContract:getPrivateMessage", "org1-collection"]}' \ - '{\"success\":\"Corrupted message\"}' -# The issue exists even for chaincodes with AND endorsement policy -expectInvoke "cli.org1.example.com" "peer0.org1.example.com:7041,peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" \ - '{"Args":["KVContract:putPrivateMessage", "org1-collection"]}' \ - '{\"success\":\"OK\"}' \ - '{"message":"RG9udCBjaGFuZ2UgbWUgcGx6"}' -expectInvoke "cli.org2.example.com" "peer0.org2.example.com:7061,peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" \ - '{"Args":["KVContract:getPrivateMessage", "org1-collection"]}' \ - 'tx creator does not have read access permission on privatedata in chaincodeName:and-policy-chaincode collectionName: org1-collection' -expectInvoke "cli.org2.example.com" "peer0.org2.example.com:7061,peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" \ - '{"Args":["KVContract:putPrivateMessage", "org1-collection"]}' \ - '{\"success\":\"OK\"}' \ - '{"message":"QW5kIGFub3RoZXIgb25l"}' -expectInvoke "cli.org1.example.com" "peer0.org1.example.com:7041,peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" \ - '{"Args":["KVContract:getPrivateMessage", "org1-collection"]}' \ - 'Error: could not assemble transaction: ProposalResponsePayloads do not match' +# TODO to be added in https://github.com/hyperledger-labs/fablo/issues/466 +#expectInvoke "peer0.org1.example.com,peer0.org2.example.com" "my-channel1" "and-policy-chaincode" \ +# '{"Args":["KVContract:putPrivateMessage", "both-orgs-collection"]}' \ +# '{\"success\":\"OK\"}' \ +# '{"message":"RG9udCBjaGFuZ2UgbWUgcGx6"}' +#expectInvoke "peer0.org2.example.com,peer0.org1.example.com" "my-channel1" "and-policy-chaincode" \ +# '{"Args":["KVContract:getPrivateMessage", "both-orgs-collection"]}' \ +# 'tx creator does not have read access permission on privatedata in chaincodeName:and-policy-chaincode collectionName: org1-collection' +#expectInvoke "peer0.org2.example.com,peer0.org1.example.com" "my-channel1" "and-policy-chaincode" \ +# '{"Args":["KVContract:putPrivateMessage", "both-orgs-collection"]}' \ +# '{\"success\":\"OK\"}' \ +# '{"message":"QW5kIGFub3RoZXIgb25l"}' +#expectInvoke "peer0.org1.example.com,peer0.org2.example.com" "my-channel1" "and-policy-chaincode" \ +# '{"Args":["KVContract:getPrivateMessage", "both-orgs-collection"]}' \ +# 'Error: could not assemble transaction: ProposalResponsePayloads do not match' diff --git a/e2e/__snapshots__/extendConfig.test.ts.snap b/e2e/__snapshots__/extendConfig.test.ts.snap index b9dab976..695c7fe9 100644 --- a/e2e/__snapshots__/extendConfig.test.ts.snap +++ b/e2e/__snapshots__/extendConfig.test.ts.snap @@ -2405,6 +2405,1419 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.j } `; +exports[`extend config samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "peersCount": 2, + "tools": {}, + }, + "name": "my-channel1", + "ordererGroup": { + "configtxOrdererDefaults": "Group1Defaults", + "consensus": "solo", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer", + ], + "name": "group1", + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + "ordererHeads": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "orderers": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "profileName": "Group1Genesis", + }, + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + "orgs": [ + { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "peersCount": 2, + "tools": {}, + }, + { + "anchorPeers": [ + { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + ], + "bootstrapPeers": "peer0.org2.example.com:7061", + "ca": { + "address": "ca.org2.example.com", + "caAdminNameVar": "ORG2_CA_ADMIN_NAME", + "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7060, + "fullAddress": "ca.org2.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org2.example.com", + }, + "cryptoConfigFileName": "crypto-config-org2", + "domain": "org2.example.com", + "headPeer": { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + "mspName": "Org2MSP", + "name": "Org2", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + ], + "peersCount": 1, + "tools": {}, + }, + ], + "profileName": "MyChannel1", + }, + "directory": "./chaincodes/chaincode-kv-node", + "endorsement": "OR('Org1MSP.member', 'Org2MSP.member')", + "initRequired": false, + "instantiatingOrg": { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "peersCount": 2, + "tools": {}, + }, + "lang": "node", + "name": "or-policy-chaincode", + "privateData": [ + { + "blockToLive": 0, + "maxPeerCount": 3, + "memberOnlyRead": true, + "memberOnlyWrite": true, + "name": "org1-collection", + "policy": "OR('Org1MSP.member')", + "requiredPeerCount": 1, + }, + ], + "privateDataConfigFile": "collections/or-policy-chaincode.json", + "version": "0.0.1", + }, + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "peersCount": 2, + "tools": {}, + }, + "name": "my-channel1", + "ordererGroup": { + "configtxOrdererDefaults": "Group1Defaults", + "consensus": "solo", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer", + ], + "name": "group1", + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + "ordererHeads": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "orderers": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "profileName": "Group1Genesis", + }, + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + "orgs": [ + { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "peersCount": 2, + "tools": {}, + }, + { + "anchorPeers": [ + { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + ], + "bootstrapPeers": "peer0.org2.example.com:7061", + "ca": { + "address": "ca.org2.example.com", + "caAdminNameVar": "ORG2_CA_ADMIN_NAME", + "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7060, + "fullAddress": "ca.org2.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org2.example.com", + }, + "cryptoConfigFileName": "crypto-config-org2", + "domain": "org2.example.com", + "headPeer": { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + "mspName": "Org2MSP", + "name": "Org2", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + ], + "peersCount": 1, + "tools": {}, + }, + ], + "profileName": "MyChannel1", + }, + "directory": "./chaincodes/chaincode-kv-node", + "endorsement": "AND('Org1MSP.member', 'Org2MSP.member')", + "initRequired": false, + "instantiatingOrg": { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "peersCount": 2, + "tools": {}, + }, + "lang": "node", + "name": "and-policy-chaincode", + "privateData": [ + { + "blockToLive": 0, + "maxPeerCount": 3, + "memberOnlyRead": true, + "memberOnlyWrite": true, + "name": "both-orgs-collection", + "policy": "OR('Org1MSP.member','Org2MSP.member')", + "requiredPeerCount": 1, + }, + ], + "privateDataConfigFile": "collections/and-policy-chaincode.json", + "version": "0.0.1", + }, + ], + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "peersCount": 2, + "tools": {}, + }, + "name": "my-channel1", + "ordererGroup": { + "configtxOrdererDefaults": "Group1Defaults", + "consensus": "solo", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer", + ], + "name": "group1", + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + "ordererHeads": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "orderers": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "profileName": "Group1Genesis", + }, + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + "orgs": [ + { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "peersCount": 2, + "tools": {}, + }, + { + "anchorPeers": [ + { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + ], + "bootstrapPeers": "peer0.org2.example.com:7061", + "ca": { + "address": "ca.org2.example.com", + "caAdminNameVar": "ORG2_CA_ADMIN_NAME", + "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7060, + "fullAddress": "ca.org2.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org2.example.com", + }, + "cryptoConfigFileName": "crypto-config-org2", + "domain": "org2.example.com", + "headPeer": { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + "mspName": "Org2MSP", + "name": "Org2", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + ], + "peersCount": 1, + "tools": {}, + }, + ], + "profileName": "MyChannel1", + }, + ], + "global": { + "capabilities": { + "application": "V2_0", + "channel": "V2_0", + "isV2": true, + "orderer": "V2_0", + }, + "engine": "docker", + "fabricBaseosVersion": "2.4.7", + "fabricCaVersion": "1.5.5", + "fabricCcenvVersion": "2.4.7", + "fabricJavaenvVersion": "2.4", + "fabricNodeenvVersion": "2.4", + "fabricRecommendedNodeVersion": "16", + "fabricVersion": "2.4.7", + "monitoring": { + "loglevel": "info", + }, + "paths": { + "chaincodesBaseDir": "", + "fabloConfig": "", + }, + "tls": false, + "tools": {}, + }, + "hooks": { + "postGenerate": "", + }, + "orderedHeadsDistinct": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "ordererGroups": [ + { + "configtxOrdererDefaults": "Group1Defaults", + "consensus": "solo", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer", + ], + "name": "group1", + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + "ordererHeads": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "orderers": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "profileName": "Group1Genesis", + }, + ], + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { + "address": "ca.orderer.example.com", + "caAdminNameVar": "ORDERER_CA_ADMIN_NAME", + "caAdminPassVar": "ORDERER_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7020, + "fullAddress": "ca.orderer.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.orderer.example.com", + }, + "cryptoConfigFileName": "crypto-config-orderer", + "domain": "orderer.example.com", + "headPeer": undefined, + "mspName": "OrdererMSP", + "name": "Orderer", + "ordererGroups": [ + { + "configtxOrdererDefaults": "Group1Defaults", + "consensus": "solo", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "Orderer", + ], + "name": "group1", + "ordererHeads": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "orderers": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "solo", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "OrdererMSP", + "orgName": "Orderer", + "port": 7030, + }, + ], + "profileName": "Group1Genesis", + }, + ], + "peers": [], + "peersCount": 0, + "tools": {}, + }, + { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "bootstrapPeers": ""peer0.org1.example.com:7041 peer1.org1.example.com:7042"", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + { + "address": "peer1.org1.example.com", + "couchDbExposePort": 5101, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer1.org1.example.com:7042", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer1", + "port": 7042, + }, + ], + "peersCount": 2, + "tools": {}, + }, + { + "anchorPeers": [ + { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + ], + "bootstrapPeers": "peer0.org2.example.com:7061", + "ca": { + "address": "ca.org2.example.com", + "caAdminNameVar": "ORG2_CA_ADMIN_NAME", + "caAdminPassVar": "ORG2_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7060, + "fullAddress": "ca.org2.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org2.example.com", + }, + "cryptoConfigFileName": "crypto-config-org2", + "domain": "org2.example.com", + "headPeer": { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + "mspName": "Org2MSP", + "name": "Org2", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org2.example.com", + "couchDbExposePort": 5120, + "db": { + "type": "LevelDb", + }, + "fullAddress": "peer0.org2.example.com:7061", + "gatewayEnabled": true, + "isAnchorPeer": true, + "name": "peer0", + "port": 7061, + }, + ], + "peersCount": 1, + "tools": {}, + }, + ], +} +`; + exports[`extend config samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] = ` { "chaincodes": [ diff --git a/e2e/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts b/e2e/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts new file mode 100644 index 00000000..8052955b --- /dev/null +++ b/e2e/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts @@ -0,0 +1,7 @@ +import performTests from "./performTests"; + +const config = "samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml"; + +describe(config, () => { + performTests(config); +}); diff --git a/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml b/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml new file mode 100644 index 00000000..65e6ec0e --- /dev/null +++ b/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml @@ -0,0 +1,58 @@ +--- +"$schema": https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json +global: + fabricVersion: 2.4.7 + tls: false + +orgs: + - organization: + name: Orderer + domain: orderer.example.com + orderers: + - groupName: group1 + prefix: orderer + type: solo + instances: 1 + - organization: + name: Org1 + domain: org1.example.com + peer: + instances: 2 + - organization: + name: Org2 + domain: org2.example.com + peer: + instances: 1 +channels: + - name: my-channel1 + orgs: + - name: Org1 + peers: + - peer0 + - peer1 + - name: Org2 + peers: + - peer0 +chaincodes: + - name: or-policy-chaincode + version: 0.0.1 + lang: node + channel: my-channel1 + init: '{"Args":[]}' + endorsement: OR('Org1MSP.member', 'Org2MSP.member') + directory: "./chaincodes/chaincode-kv-node" + privateData: + - name: org1-collection + orgNames: + - Org1 + - name: and-policy-chaincode + version: 0.0.1 + lang: node + channel: my-channel1 + endorsement: AND('Org1MSP.member', 'Org2MSP.member') + directory: "./chaincodes/chaincode-kv-node" + privateData: + - name: both-orgs-collection + orgNames: + - Org1 + - Org2 From bd0c0d7239e8a4322722998e4089a1db545ce3da Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Thu, 8 Aug 2024 11:27:00 +0200 Subject: [PATCH 75/83] Comment out Kubernetes check Signed-off-by: Jakub Dzikowski --- .github/workflows/test-on-push.yml | 108 ++++++++++++++--------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/.github/workflows/test-on-push.yml b/.github/workflows/test-on-push.yml index 34bc074b..d2ca3c8c 100644 --- a/.github/workflows/test-on-push.yml +++ b/.github/workflows/test-on-push.yml @@ -40,60 +40,60 @@ jobs: - name: Lint run: npm run lint && ./lint.sh - test-k8: - needs: test-main - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - - name: Check out repository code - uses: actions/checkout@v2 - - - name: install k8, hlf plugin and helm - run: | - curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.14.0/kind-linux-amd64 - chmod +x ./kind - sudo mv ./kind /usr/local/bin/kind - kind create cluster --wait 5m - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 - chmod 700 get_helm.sh - ./get_helm.sh - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" - chmod +x kubectl - sudo mv ./kubectl /usr/local/bin/kubectl - set -x; cd "$(mktemp -d)" && - OS="$(uname | tr '[:upper:]' '[:lower:]')" && - ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" && - KREW="krew-${OS}_${ARCH}" && - curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" && - tar zxvf "${KREW}.tar.gz" && - ./"${KREW}" install krew - export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" - kubectl krew install hlf - - if [ -f "~/.bashrc" ]; then - echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc - fi - - if [ -f "~/.zshrc" ]; then - echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc - fi - - helm repo add kfs "https://kfsoftware.github.io/hlf-helm-charts" --force-update - helm install hlf-operator --version=1.8.0 kfs/hlf-operator - - - name: Build Fablo - run: | - shellcheck --version && \ - yamllint -v && \ - npm install && \ - npm run build && \ - ./fablo-build.sh - - - name: fablo k8 tests - run: | - export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" - e2e-network/k8s/test-01-simple-k8s.sh + # test-k8: + # needs: test-main + # runs-on: ubuntu-latest + # timeout-minutes: 30 + # steps: + # + # - name: Check out repository code + # uses: actions/checkout@v2 + # + # - name: install k8, hlf plugin and helm + # run: | + # curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.14.0/kind-linux-amd64 + # chmod +x ./kind + # sudo mv ./kind /usr/local/bin/kind + # kind create cluster --wait 5m + # curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 + # chmod 700 get_helm.sh + # ./get_helm.sh + # curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + # chmod +x kubectl + # sudo mv ./kubectl /usr/local/bin/kubectl + # set -x; cd "$(mktemp -d)" && + # OS="$(uname | tr '[:upper:]' '[:lower:]')" && + # ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" && + # KREW="krew-${OS}_${ARCH}" && + # curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" && + # tar zxvf "${KREW}.tar.gz" && + # ./"${KREW}" install krew + # export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" + # kubectl krew install hlf + # + # if [ -f "~/.bashrc" ]; then + # echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc + # fi + # + # if [ -f "~/.zshrc" ]; then + # echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc + # fi + # + # helm repo add kfs "https://kfsoftware.github.io/hlf-helm-charts" --force-update + # helm install hlf-operator --version=1.8.0 kfs/hlf-operator + # + # - name: Build Fablo + # run: | + # shellcheck --version && \ + # yamllint -v && \ + # npm install && \ + # npm run build && \ + # ./fablo-build.sh + # + # - name: fablo k8 tests + # run: | + # export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" + # e2e-network/k8s/test-01-simple-k8s.sh test-02-raft: needs: test-main From c93f7b1f07f3575982dab8fd81db2e2141f3afbf Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Thu, 8 Aug 2024 11:35:37 +0200 Subject: [PATCH 76/83] Add missing snapshot Signed-off-by: Jakub Dzikowski --- ...2chaincodes-private-data.yaml.test.ts.snap | 4092 +++++++++++++++++ 1 file changed, 4092 insertions(+) create mode 100644 e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap new file mode 100644 index 00000000..5b4bfb00 --- /dev/null +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -0,0 +1,4092 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/.gitignore from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"/config +/crypto-config +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/and-policy-chaincode.json from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"[ + { + "name": "both-orgs-collection", + "policy": "OR('Org1MSP.member','Org2MSP.member')", + "requiredPeerCount": 1, + "maxPeerCount": 3, + "blockToLive": 0, + "memberOnlyRead": true, + "memberOnlyWrite": true + } +]" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/or-policy-chaincode.json from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"[ + { + "name": "org1-collection", + "policy": "OR('Org1MSP.member')", + "requiredPeerCount": 1, + "maxPeerCount": 3, + "blockToLive": 0, + "memberOnlyRead": true, + "memberOnlyWrite": true + } +]" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/configtx.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"################################################################################ +# SECTION: Capabilities +################################################################################ +Capabilities: + Channel: &ChannelCapabilities + V2_0: true + Orderer: &OrdererCapabilities + V2_0: true + Application: &ApplicationCapabilities + V2_0: true + +################################################################################ +# CHANNEL Defaults +################################################################################ +Channel: &ChannelDefaults + Policies: + Readers: + Type: ImplicitMeta + Rule: "ANY Readers" + Writers: + Type: ImplicitMeta + Rule: "ANY Writers" + Admins: + Type: ImplicitMeta + Rule: "MAJORITY Admins" + Capabilities: + <<: *ChannelCapabilities + +################################################################################ +# Section: Organizations +################################################################################ +Organizations: + - &Orderer + Name: OrdererMSP + ID: OrdererMSP + MSPDir: crypto-config/peerOrganizations/orderer.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: "OR('OrdererMSP.member')" + Writers: + Type: Signature + Rule: "OR('OrdererMSP.member')" + Admins: + Type: Signature + Rule: "OR('OrdererMSP.admin')" + Endorsement: + Type: Signature + Rule: "OR('OrdererMSP.member')" + + AnchorPeers: + + - &Org1 + Name: Org1MSP + ID: Org1MSP + MSPDir: crypto-config/peerOrganizations/org1.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: "OR('Org1MSP.member')" + Writers: + Type: Signature + Rule: "OR('Org1MSP.member')" + Admins: + Type: Signature + Rule: "OR('Org1MSP.admin')" + Endorsement: + Type: Signature + Rule: "OR('Org1MSP.member')" + + AnchorPeers: + - Host: peer0.org1.example.com + Port: 7041 + + - Host: peer1.org1.example.com + Port: 7042 + + - &Org2 + Name: Org2MSP + ID: Org2MSP + MSPDir: crypto-config/peerOrganizations/org2.example.com/msp + + Policies: + Readers: + Type: Signature + Rule: "OR('Org2MSP.member')" + Writers: + Type: Signature + Rule: "OR('Org2MSP.member')" + Admins: + Type: Signature + Rule: "OR('Org2MSP.admin')" + Endorsement: + Type: Signature + Rule: "OR('Org2MSP.member')" + + AnchorPeers: + - Host: peer0.org2.example.com + Port: 7061 + +################################################################################ +# SECTION: Application +################################################################################ +Application: &ApplicationDefaults + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Application policies, their canonical path is + # /Channel/Application/ + Policies: + Readers: + Type: ImplicitMeta + Rule: "ANY Readers" + Writers: + Type: ImplicitMeta + Rule: "ANY Writers" + Admins: + Type: ImplicitMeta + Rule: "MAJORITY Admins" + Endorsement: + Type: ImplicitMeta + Rule: "MAJORITY Endorsement" + Capabilities: + <<: *ApplicationCapabilities + +################################################################################ +# SECTION: Orderer +################################################################################ +Orderer: &Group1Defaults + OrdererType: solo + Addresses: + - orderer0.group1.orderer.example.com:7030 + BatchTimeout: 2s + BatchSize: + MaxMessageCount: 10 + AbsoluteMaxBytes: 99 MB + PreferredMaxBytes: 512 KB + Organizations: + # Policies defines the set of policies at this level of the config tree + # For Orderer policies, their canonical path is + # /Channel/Orderer/ + Policies: + Readers: + Type: ImplicitMeta + Rule: "ANY Readers" + Writers: + Type: ImplicitMeta + Rule: "ANY Writers" + Admins: + Type: ImplicitMeta + Rule: "MAJORITY Admins" + # BlockValidation specifies what signatures must be included in the block + # from the orderer for the peer to validate it. + BlockValidation: + Type: ImplicitMeta + Rule: "ANY Writers" + Capabilities: + <<: *OrdererCapabilities + +################################################################################ +# Profile +################################################################################ +# https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml + +Profiles: + # Profile used to create Genesis block for group group1 # + Group1Genesis: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 + + # Profile used to create channeltx for my-channel1 # + MyChannel1: + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"{ + "name": "fablo-test-network-orderer", + "description": "Connection profile for Orderer in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Orderer" + }, + "organizations": { + "Orderer": { + "mspid": "OrdererMSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com" + ], + "certificateAuthorities": [ + "ca.orderer.example.com" + ] + } + }, + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" + }, + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" + }, + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" + } + }, + "certificateAuthorities": { + "ca.orderer.example.com": { + "url": "http://localhost:7020", + "caName": "ca.orderer.example.com", + "httpOptions": { + "verify": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"name: fablo-test-network-orderer +description: Connection profile for Orderer in Fablo network +version: 1.0.0 +client: + organization: Orderer +organizations: + Orderer: + mspid: OrdererMSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + certificateAuthorities: + - ca.orderer.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 +certificateAuthorities: + ca.orderer.example.com: + url: http://localhost:7020 + caName: ca.orderer.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"{ + "name": "fablo-test-network-org1", + "description": "Connection profile for Org1 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org1" + }, + "organizations": { + "Org1": { + "mspid": "Org1MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com" + ], + "certificateAuthorities": [ + "ca.org1.example.com" + ] + } + }, + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" + }, + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" + }, + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" + } + }, + "certificateAuthorities": { + "ca.org1.example.com": { + "url": "http://localhost:7040", + "caName": "ca.org1.example.com", + "httpOptions": { + "verify": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"name: fablo-test-network-org1 +description: Connection profile for Org1 in Fablo network +version: 1.0.0 +client: + organization: Org1 +organizations: + Org1: + mspid: Org1MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + certificateAuthorities: + - ca.org1.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 +certificateAuthorities: + ca.org1.example.com: + url: http://localhost:7040 + caName: ca.org1.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"{ + "name": "fablo-test-network-org2", + "description": "Connection profile for Org2 in Fablo network", + "version": "1.0.0", + "client": { + "organization": "Org2" + }, + "organizations": { + "Org2": { + "mspid": "Org2MSP", + "peers": [ + "peer0.org1.example.com", + "peer1.org1.example.com", + "peer0.org2.example.com" + ], + "certificateAuthorities": [ + "ca.org2.example.com" + ] + } + }, + "peers": { + "peer0.org1.example.com": { + "url": "grpc://localhost:7041" + }, + "peer1.org1.example.com": { + "url": "grpc://localhost:7042" + }, + "peer0.org2.example.com": { + "url": "grpc://localhost:7061" + } + }, + "certificateAuthorities": { + "ca.org2.example.com": { + "url": "http://localhost:7060", + "caName": "ca.org2.example.com", + "httpOptions": { + "verify": false + } + } + } +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"name: fablo-test-network-org2 +description: Connection profile for Org2 in Fablo network +version: 1.0.0 +client: + organization: Org2 +organizations: + Org2: + mspid: Org2MSP + peers: + - peer0.org1.example.com + - peer1.org1.example.com + - peer0.org2.example.com + certificateAuthorities: + - ca.org2.example.com +peers: + peer0.org1.example.com: + url: grpc://localhost:7041 + peer1.org1.example.com: + url: grpc://localhost:7042 + peer0.org2.example.com: + url: grpc://localhost:7061 +certificateAuthorities: + ca.org2.example.com: + url: http://localhost:7060 + caName: ca.org2.example.com + httpOptions: + verify: false +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"PeerOrgs: + - Name: Orderer + Domain: orderer.example.com + Specs: + - Hostname: orderer0.group1 + Template: + Count: 0 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"PeerOrgs: + - Name: Org1 + Domain: org1.example.com + Specs: + Template: + Count: 2 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"PeerOrgs: + - Name: Org2 + Domain: org2.example.com + Specs: + Template: + Count: 1 + Users: + Count: 1 +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/explorer/config-global.json from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"{ + "network-configs": { + "network-org1": { + "name": "Network of Org1", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org1.json" + }, + "network-org2": { + "name": "Network of Org2", + "profile": "/opt/explorer/app/platform/fabric/connection-profile/connection-profile-org2.json" + } + }, + "license": "Apache-2.0" +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the "keyfile" element in the "ca" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with "file" or "files" are +# name or names of other files. +# For example, see "tls.certfile" and "tls.clientauth.certfiles". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - "*" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if "ldap.enabled" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: "" + attrs: + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: "*" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: "sqlite3", "postgres", and "mysql". +# The datasource value depends on the type. +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the "registry" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named "hf.Revoker" with a value of "true" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr("uid") =~ "revoker*" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr("member"),"groups") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + orderer: + +############################################################################# +# Signing section +# +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. +# +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# "ca.expiry" field below, whose default value is "131400h" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: "North Carolina" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are "ca1", "ca2", ... "caN", where "N" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the "Multi CA section" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the "intermediate.parentserver.url" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the "keyfile" element in the "ca" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with "file" or "files" are +# name or names of other files. +# For example, see "tls.certfile" and "tls.clientauth.certfiles". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - "*" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if "ldap.enabled" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: "" + attrs: + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: "*" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: "sqlite3", "postgres", and "mysql". +# The datasource value depends on the type. +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the "registry" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named "hf.Revoker" with a value of "true" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr("uid") =~ "revoker*" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr("member"),"groups") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org1: + +############################################################################# +# Signing section +# +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. +# +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# "ca.expiry" field below, whose default value is "131400h" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: "North Carolina" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are "ca1", "ca2", ... "caN", where "N" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the "Multi CA section" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the "intermediate.parentserver.url" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"############################################################################# +# This is a configuration file for the fabric-ca-server command. +# +# COMMAND LINE ARGUMENTS AND ENVIRONMENT VARIABLES +# ------------------------------------------------ +# Each configuration element can be overridden via command line +# arguments or environment variables. The precedence for determining +# the value of each element is as follows: +# 1) command line argument +# Examples: +# a) --port 443 +# To set the listening port +# b) --ca.keyfile ../mykey.pem +# To set the "keyfile" element in the "ca" section below; +# note the '.' separator character. +# 2) environment variable +# Examples: +# a) FABRIC_CA_SERVER_PORT=443 +# To set the listening port +# b) FABRIC_CA_SERVER_CA_KEYFILE="../mykey.pem" +# To set the "keyfile" element in the "ca" section below; +# note the '_' separator character. +# 3) configuration file +# 4) default value (if there is one) +# All default values are shown beside each element below. +# +# FILE NAME ELEMENTS +# ------------------ +# The value of all fields whose name ends with "file" or "files" are +# name or names of other files. +# For example, see "tls.certfile" and "tls.clientauth.certfiles". +# The value of each of these fields can be a simple filename, a +# relative path, or an absolute path. If the value is not an +# absolute path, it is interpreted as being relative to the location +# of this configuration file. +# +############################################################################# + +# Version of config file +version: 1.5.5 + +# Server's listening port (default: 7054) +port: 7054 + +# Cross-Origin Resource Sharing (CORS) +cors: + enabled: false + origins: + - "*" + +# Enables debug logging (default: false) +debug: false + +# Size limit of an acceptable CRL in bytes (default: 512000) +crlsizelimit: 512000 + +############################################################################# +# TLS section for the server's listening port +# +# The following types are supported for client authentication: NoClientCert, +# RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, +# and RequireAndVerifyClientCert. +# +# Certfiles is a list of root certificate authorities that the server uses +# when verifying client certificates. +############################################################################# +tls: + # Enable TLS (default: false) + enabled: false + # TLS for the server's listening port + certfile: + keyfile: + clientauth: + type: noclientcert + certfiles: + +############################################################################# +# The CA section contains information related to the Certificate Authority +# including the name of the CA, which should be unique for all members +# of a blockchain network. It also includes the key and certificate files +# used when issuing enrollment certificates (ECerts). +# The chainfile (if it exists) contains the certificate chain which +# should be trusted for this CA, where the 1st in the chain is always the +# root CA certificate. +############################################################################# +ca: + # Name of this CA + name: + # Key file (is only used to import a private key into BCCSP) + keyfile: + # Certificate file (default: ca-cert.pem) + certfile: + # Chain file + chainfile: + +############################################################################# +# The gencrl REST endpoint is used to generate a CRL that contains revoked +# certificates. This section contains configuration options that are used +# during gencrl request processing. +############################################################################# +crl: + # Specifies expiration for the generated CRL. The number of hours + # specified by this property is added to the UTC time, the resulting time + # is used to set the 'Next Update' date of the CRL. + expiry: 24h + +############################################################################# +# The registry section controls how the fabric-ca-server does two things: +# 1) authenticates enrollment requests which contain a username and password +# (also known as an enrollment ID and secret). +# 2) once authenticated, retrieves the identity's attribute names and values. +# These attributes are useful for making access control decisions in +# chaincode. +# There are two main configuration options: +# 1) The fabric-ca-server is the registry. +# This is true if "ldap.enabled" in the ldap section below is false. +# 2) An LDAP server is the registry, in which case the fabric-ca-server +# calls the LDAP server to perform these tasks. +# This is true if "ldap.enabled" in the ldap section below is true, +# which means this "registry" section is ignored. +############################################################################# +registry: + # Maximum number of times a password/secret can be reused for enrollment + # (default: -1, which means there is no limit) + maxenrollments: -1 + + # Contains identity information which is used when LDAP is disabled + identities: + - name: admin + pass: adminpw + type: client + affiliation: "" + attrs: + hf.Registrar.Roles: "*" + hf.Registrar.DelegateRoles: "*" + hf.Revoker: true + hf.IntermediateCA: true + hf.GenCRL: true + hf.Registrar.Attributes: "*" + hf.AffiliationMgr: true + +############################################################################# +# Database section +# Supported types are: "sqlite3", "postgres", and "mysql". +# The datasource value depends on the type. +# If the type is "sqlite3", the datasource value is a file name to use +# as the database store. Since "sqlite3" is an embedded database, it +# may not be used if you want to run the fabric-ca-server in a cluster. +# To run the fabric-ca-server in a cluster, you must choose "postgres" +# or "mysql". +############################################################################# +db: + type: sqlite3 + datasource: fabric-ca-server.db + tls: + enabled: false + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# LDAP section +# If LDAP is enabled, the fabric-ca-server calls LDAP to: +# 1) authenticate enrollment ID and secret (i.e. username and password) +# for enrollment requests; +# 2) To retrieve identity attributes +############################################################################# +ldap: + # Enables or disables the LDAP client (default: false) + # If this is set to true, the "registry" section is ignored. + enabled: false + # The URL of the LDAP server + url: ldap://:@:/ + # TLS configuration for the client connection to the LDAP server + tls: + certfiles: + client: + certfile: + keyfile: + # Attribute related configuration for mapping from LDAP entries to Fabric CA attributes + attribute: + # 'names' is an array of strings containing the LDAP attribute names which are + # requested from the LDAP server for an LDAP identity's entry + names: ['uid', 'member'] + # The 'converters' section is used to convert an LDAP entry to the value of + # a fabric CA attribute. + # For example, the following converts an LDAP 'uid' attribute + # whose value begins with 'revoker' to a fabric CA attribute + # named "hf.Revoker" with a value of "true" (because the boolean expression + # evaluates to true). + # converters: + # - name: hf.Revoker + # value: attr("uid") =~ "revoker*" + converters: + - name: + value: + # The 'maps' section contains named maps which may be referenced by the 'map' + # function in the 'converters' section to map LDAP responses to arbitrary values. + # For example, assume a user has an LDAP attribute named 'member' which has multiple + # values which are each a distinguished name (i.e. a DN). For simplicity, assume the + # values of the 'member' attribute are 'dn1', 'dn2', and 'dn3'. + # Further assume the following configuration. + # converters: + # - name: hf.Registrar.Roles + # value: map(attr("member"),"groups") + # maps: + # groups: + # - name: dn1 + # value: peer + # - name: dn2 + # value: client + # The value of the user's 'hf.Registrar.Roles' attribute is then computed to be + # "peer,client,dn3". This is because the value of 'attr("member")' is + # "dn1,dn2,dn3", and the call to 'map' with a 2nd argument of + # "group" replaces "dn1" with "peer" and "dn2" with "client". + maps: + groups: + - name: + value: + +############################################################################# +# Affiliations section. Fabric CA server can be bootstrapped with the +# affiliations specified in this section. Affiliations are specified as maps. +# For example: +# businessunit1: +# department1: +# - team1 +# businessunit2: +# - department2 +# - department3 +# +# Affiliations are hierarchical in nature. In the above example, +# department1 (used as businessunit1.department1) is the child of businessunit1. +# team1 (used as businessunit1.department1.team1) is the child of department1. +# department2 (used as businessunit2.department2) and department3 (businessunit2.department3) +# are children of businessunit2. +# Note: Affiliations are case sensitive except for the non-leaf affiliations +# (like businessunit1, department1, businessunit2) that are specified in the configuration file, +# which are always stored in lower case. +############################################################################# +affiliations: + org2: + +############################################################################# +# Signing section +# +# The "default" subsection is used to sign enrollment certificates; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. +# +# The "ca" profile subsection is used to sign intermediate CA certificates; +# the default expiration ("expiry" field) is "43800h" which is 5 years in hours. +# Note that "isca" is true, meaning that it issues a CA certificate. +# A maxpathlen of 0 means that the intermediate CA cannot issue other +# intermediate CA certificates, though it can still issue end entity certificates. +# (See RFC 5280, section 4.2.1.9) +# +# The "tls" profile subsection is used to sign TLS certificate requests; +# the default expiration ("expiry" field) is "8760h", which is 1 year in hours. +############################################################################# +signing: + default: + usage: + - digital signature + expiry: 8760h + profiles: + ca: + usage: + - cert sign + - crl sign + expiry: 43800h + caconstraint: + isca: true + maxpathlen: 0 + tls: + usage: + - signing + - key encipherment + - server auth + - client auth + - key agreement + expiry: 8760h + +########################################################################### +# Certificate Signing Request (CSR) section. +# This controls the creation of the root CA certificate. +# The expiration for the root CA certificate is configured with the +# "ca.expiry" field below, whose default value is "131400h" which is +# 15 years in hours. +# The pathlength field is used to limit CA certificate hierarchy as described +# in section 4.2.1.9 of RFC 5280. +# Examples: +# 1) No pathlength value means no limit is requested. +# 2) pathlength == 1 means a limit of 1 is requested which is the default for +# a root CA. This means the root CA can issue intermediate CA certificates, +# but these intermediate CAs may not in turn issue other CA certificates +# though they can still issue end entity certificates. +# 3) pathlength == 0 means a limit of 0 is requested; +# this is the default for an intermediate CA, which means it can not issue +# CA certificates though it can still issue end entity certificates. +########################################################################### +csr: + cn: fabric-ca-server + keyrequest: + algo: ecdsa + size: 256 + names: + - C: US + ST: "North Carolina" + L: + O: Hyperledger + OU: Fabric + hosts: + - 483cccf16a98 + - localhost + ca: + expiry: 131400h + pathlength: 1 + +########################################################################### +# Each CA can issue both X509 enrollment certificate as well as Idemix +# Credential. This section specifies configuration for the issuer component +# that is responsible for issuing Idemix credentials. +########################################################################### +idemix: + # Specifies pool size for revocation handles. A revocation handle is an unique identifier of an + # Idemix credential. The issuer will create a pool revocation handles of this specified size. When + # a credential is requested, issuer will get handle from the pool and assign it to the credential. + # Issuer will repopulate the pool with new handles when the last handle in the pool is used. + # A revocation handle and credential revocation information (CRI) are used to create non revocation proof + # by the prover to prove to the verifier that her credential is not revoked. + rhpoolsize: 1000 + + # The Idemix credential issuance is a two step process. First step is to get a nonce from the issuer + # and second step is send credential request that is constructed using the nonce to the isuser to + # request a credential. This configuration property specifies expiration for the nonces. By default is + # nonces expire after 15 seconds. The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration). + nonceexpiration: 15s + + # Specifies interval at which expired nonces are removed from datastore. Default value is 15 minutes. + # The value is expressed in the time.Duration format (see https://golang.org/pkg/time/#ParseDuration) + noncesweepinterval: 15m + +############################################################################# +# BCCSP (BlockChain Crypto Service Provider) section is used to select which +# crypto library implementation to use +############################################################################# +bccsp: + default: SW + sw: + hash: SHA2 + security: 256 + filekeystore: + # The directory used for the software file-based keystore + keystore: msp/keystore + +############################################################################# +# Multi CA section +# +# Each Fabric CA server contains one CA by default. This section is used +# to configure multiple CAs in a single server. +# +# 1) --cacount +# Automatically generate non-default CAs. The names of these +# additional CAs are "ca1", "ca2", ... "caN", where "N" is +# This is particularly useful in a development environment to quickly set up +# multiple CAs. Note that, this config option is not applicable to intermediate CA server +# i.e., Fabric CA server that is started with intermediate.parentserver.url config +# option (-u command line option) +# +# 2) --cafiles +# For each CA config file in the list, generate a separate signing CA. Each CA +# config file in this list MAY contain all of the same elements as are found in +# the server config file except port, debug, and tls sections. +# +# Examples: +# fabric-ca-server start -b admin:adminpw --cacount 2 +# +# fabric-ca-server start -b admin:adminpw --cafiles ca/ca1/fabric-ca-server-config.yaml +# --cafiles ca/ca2/fabric-ca-server-config.yaml +# +############################################################################# + +cacount: + +cafiles: + +############################################################################# +# Intermediate CA section +# +# The relationship between servers and CAs is as follows: +# 1) A single server process may contain or function as one or more CAs. +# This is configured by the "Multi CA section" above. +# 2) Each CA is either a root CA or an intermediate CA. +# 3) Each intermediate CA has a parent CA which is either a root CA or another intermediate CA. +# +# This section pertains to configuration of #2 and #3. +# If the "intermediate.parentserver.url" property is set, +# then this is an intermediate CA with the specified parent +# CA. +# +# parentserver section +# url - The URL of the parent server +# caname - Name of the CA to enroll within the server +# +# enrollment section used to enroll intermediate CA with parent CA +# profile - Name of the signing profile to use in issuing the certificate +# label - Label to use in HSM operations +# +# tls section for secure socket connection +# certfiles - PEM-encoded list of trusted root certificate files +# client: +# certfile - PEM-encoded certificate file for when client authentication +# is enabled on server +# keyfile - PEM-encoded key file for when client authentication +# is enabled on server +############################################################################# +intermediate: + parentserver: + url: + caname: + + enrollment: + hosts: + profile: + label: + + tls: + certfiles: + client: + certfile: + keyfile: + +############################################################################# +# CA configuration section +# +# Configure the number of incorrect password attempts are allowed for +# identities. By default, the value of 'passwordattempts' is 10, which +# means that 10 incorrect password attempts can be made before an identity get +# locked out. +############################################################################# +cfg: + identities: + passwordattempts: 10 + +############################################################################### +# +# Operations section +# +############################################################################### +operations: + # host and port for the operations server + listenAddress: 127.0.0.1:9443 + + # TLS configuration for the operations endpoint + tls: + # TLS enabled + enabled: false + + # path to PEM encoded server certificate for the operations server + cert: + file: + + # path to PEM encoded server key for the operations server + key: + file: + + # require client certificate authentication to access all resources + clientAuthRequired: false + + # paths to PEM encoded ca certificates to trust for client authentication + clientRootCAs: + files: [] + +############################################################################### +# +# Metrics section +# +############################################################################### +metrics: + # statsd, prometheus, or disabled + provider: disabled + + # statsd configuration + statsd: + # network type: tcp or udp + network: udp + + # statsd server address + address: 127.0.0.1:8125 + + # the interval at which locally cached counters and gauges are pushed + # to statsd; timings are pushed immediately + writeInterval: 10s + + # prefix is prepended to all emitted statsd metrics + prefix: server +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +set -eu + +FABLO_NETWORK_ROOT="$(cd "$(dirname "$0")" && pwd)" + +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-help.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/base-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/chaincode-functions.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/channel-query-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/snapshot-scripts.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/commands-generated.sh" +source "$FABLO_NETWORK_ROOT/fabric-docker/.env" +source "$FABLO_NETWORK_ROOT/fabric-docker/chaincode-scripts.sh" + +networkUp() { + generateArtifacts + startNetwork + generateChannelsArtifacts + installChannels + installChaincodes + notifyOrgsAboutChannels + printStartSuccessInfo +} + +if [ "$1" = "up" ]; then + networkUp +elif [ "$1" = "down" ]; then + networkDown +elif [ "$1" = "reset" ]; then + networkDown + networkUp +elif [ "$1" = "start" ]; then + startNetwork +elif [ "$1" = "stop" ]; then + stopNetwork +elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then + installChaincodes +elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then + installChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then + upgradeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then + runDevModeChaincode "$3" "$4" +elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then + chaincodeInvoke "$3" "$4" "$5" "$6" "$7" +elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then + chaincodeList "$3" "$4" +elif [ "$1" = "channel" ]; then + channelQuery "\${@:2}" +elif [ "$1" = "snapshot" ]; then + createSnapshot "$2" +elif [ "$1" = "clone-to" ]; then + cloneSnapshot "$2" "\${3:-""}" +elif [ "$1" = "help" ]; then + printHelp +elif [ "$1" = "--help" ]; then + printHelp +else + echo "No command specified" + echo "Basic commands are: up, down, start, stop, reset" + echo "To list channel query helper commands type: 'fablo channel --help'" + echo "Also check: 'chaincode install'" + echo "Use 'help' or '--help' for more information" +fi +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"FABLO_VERSION=1.2.1-unstable.0 +FABLO_BUILD= +FABLO_REST_VERSION=0.1.0 +HYPERLEDGER_EXPLORER_VERSION=1.1.8 + +COUCHDB_VERSION=3.1 +FABRIC_COUCHDB_VERSION=0.4.18 + +FABLO_CONFIG= +CHAINCODES_BASE_DIR= + +COMPOSE_PROJECT_NAME= +LOGGING_LEVEL=info + +FABRIC_VERSION=2.4.7 +FABRIC_CA_VERSION=1.5.5 +FABRIC_CA_POSTGRES_VERSION=14 +FABRIC_CCENV_VERSION=2.4.7 +FABRIC_BASEOS_VERSION=2.4.7 +FABRIC_JAVAENV_VERSION=2.4 +FABRIC_NODEENV_VERSION=2.4 +RECOMMENDED_NODE_VERSION=16 + +ROOT_CA_ADMIN_NAME=admin +ROOT_CA_ADMIN_PASSWORD=adminpw + +ORDERER_CA_ADMIN_NAME=admin +ORDERER_CA_ADMIN_PASSWORD=adminpw + +ORG1_CA_ADMIN_NAME=admin +ORG1_CA_ADMIN_PASSWORD=adminpw + +ORG2_CA_ADMIN_NAME=admin +ORG2_CA_ADMIN_PASSWORD=adminpw + +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +chaincodeList() { + if [ "$#" -ne 2 ]; then + echo "Expected 2 parameters for chaincode list, but got: $*" + exit 1 + + elif [ "$1" = "peer0.org1.example.com" ]; then + + peerChaincodeList "cli.org1.example.com" "peer0.org1.example.com:7041" "$2" # $2 is channel name + + elif + [ "$1" = "peer1.org1.example.com" ] + then + + peerChaincodeList "cli.org1.example.com" "peer1.org1.example.com:7042" "$2" # $2 is channel name + + elif + [ "$1" = "peer0.org2.example.com" ] + then + + peerChaincodeList "cli.org2.example.com" "peer0.org2.example.com:7061" "$2" # $2 is channel name + + else + + echo "Fail to call listChaincodes. No peer or channel found. Provided peer: $1, channel: $2" + exit 1 + + fi +} + +# Function to perform chaincode invoke. Accepts 5 parameters: +# 1. comma-separated peers +# 2. channel name +# 3. chaincode name +# 4. chaincode command +# 5. transient data (optional) +chaincodeInvoke() { + if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then + echo "Expected 4 or 5 parameters for chaincode list, but got: $*" + echo "Usage: fablo chaincode invoke [transient]" + exit 1 + fi + cli="" + peer_addresses="" + + if [[ "$1" == *"peer0.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer0.org1.example.com:7041" + + fi + if [[ "$1" == *"peer1.org1.example.com"* ]]; then + cli="cli.org1.example.com" + peer_addresses="$peer_addresses,peer1.org1.example.com:7042" + + fi + if [[ "$1" == *"peer0.org2.example.com"* ]]; then + cli="cli.org2.example.com" + peer_addresses="$peer_addresses,peer0.org2.example.com:7061" + + fi + if [ -z "$peer_addresses" ]; then + echo "Unknown peers: $1" + exit 1 + fi + + peerChaincodeInvoke "$cli" "\${peer_addresses:1}" "$2" "$3" "$4" "$5" + +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +source "$FABLO_NETWORK_ROOT/fabric-docker/scripts/channel-query-functions.sh" + +set -eu + +channelQuery() { + echo "-> Channel query: " + "$@" + + if [ "$#" -eq 1 ]; then + printChannelsHelp + + elif [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer0" ]; then + + peerChannelList "cli.org1.example.com" "peer0.org1.example.com:7041" + + elif + [ "$1" = "list" ] && [ "$2" = "org1" ] && [ "$3" = "peer1" ] + then + + peerChannelList "cli.org1.example.com" "peer1.org1.example.com:7042" + + elif + [ "$1" = "list" ] && [ "$2" = "org2" ] && [ "$3" = "peer0" ] + then + + peerChannelList "cli.org2.example.com" "peer0.org2.example.com:7061" + + elif + + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer0" ] + then + + peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer0.org1.example.com:7041" + + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} + + peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer0.org1.example.com:7041" + + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer0" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} + + peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer0.org1.example.com:7041" "$TARGET_FILE" + + elif + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org1" ] && [ "$4" = "peer1" ] + then + + peerChannelGetInfo "my-channel1" "cli.org1.example.com" "peer1.org1.example.com:7042" + + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} + + peerChannelFetchConfig "my-channel1" "cli.org1.example.com" "$TARGET_FILE" "peer1.org1.example.com:7042" + + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org1" ] && [ "$5" = "peer1" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} + + peerChannelFetchBlock "my-channel1" "cli.org1.example.com" "\${BLOCK_NAME}" "peer1.org1.example.com:7042" "$TARGET_FILE" + + elif + [ "$1" = "getinfo" ] && [ "$2" = "my-channel1" ] && [ "$3" = "org2" ] && [ "$4" = "peer0" ] + then + + peerChannelGetInfo "my-channel1" "cli.org2.example.com" "peer0.org2.example.com:7061" + + elif [ "$1" = "fetch" ] && [ "$2" = "config" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then + TARGET_FILE=\${6:-"$channel-config.json"} + + peerChannelFetchConfig "my-channel1" "cli.org2.example.com" "$TARGET_FILE" "peer0.org2.example.com:7061" + + elif [ "$1" = "fetch" ] && [ "$3" = "my-channel1" ] && [ "$4" = "org2" ] && [ "$5" = "peer0" ]; then + BLOCK_NAME=$2 + TARGET_FILE=\${6:-"$BLOCK_NAME.block"} + + peerChannelFetchBlock "my-channel1" "cli.org2.example.com" "\${BLOCK_NAME}" "peer0.org2.example.com:7061" "$TARGET_FILE" + + else + + echo "$@" + echo "$1, $2, $3, $4, $5, $6, $7, $#" + printChannelsHelp + fi + +} + +printChannelsHelp() { + echo "Channel management commands:" + echo "" + + echo "fablo channel list org1 peer0" + echo -e "\\t List channels on 'peer0' of 'Org1'". + echo "" + + echo "fablo channel list org1 peer1" + echo -e "\\t List channels on 'peer1' of 'Org1'". + echo "" + + echo "fablo channel list org2 peer0" + echo -e "\\t List channels on 'peer0' of 'Org2'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org1 peer1" + echo -e "\\t Get channel info on 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch config my-channel1 org1 peer1 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + echo "fablo channel fetch my-channel1 org1 peer1 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer1' of 'Org1'". + echo "" + + echo "fablo channel getinfo my-channel1 org2 peer0" + echo -e "\\t Get channel info on 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch config my-channel1 org2 peer0 [file-name.json]" + echo -e "\\t Download latest config block and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + echo "fablo channel fetch my-channel1 org2 peer0 [file name]" + echo -e "\\t Fetch a block with given number and save it. Uses first peer 'peer0' of 'Org2'". + echo "" + +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/commands-generated.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +generateArtifacts() { + printHeadline "Generating basic configs" "U1F913" + + printItalics "Generating crypto material for Orderer" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-orderer.yaml" "peerOrganizations/orderer.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" + + printItalics "Generating crypto material for Org1" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org1.yaml" "peerOrganizations/org1.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" + + printItalics "Generating crypto material for Org2" "U1F512" + certsGenerate "$FABLO_NETWORK_ROOT/fabric-config" "crypto-config-org2.yaml" "peerOrganizations/org2.example.com" "$FABLO_NETWORK_ROOT/fabric-config/crypto-config/" + + printItalics "Generating genesis block for group group1" "U1F3E0" + genesisBlockCreate "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" "Group1Genesis" + + # Create directory for chaincode packages to avoid permission errors on linux + mkdir -p "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" +} + +startNetwork() { + printHeadline "Starting network" "U1F680" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose up -d) + sleep 4 +} + +generateChannelsArtifacts() { + printHeadline "Generating config for 'my-channel1'" "U1F913" + createChannelTx "my-channel1" "$FABLO_NETWORK_ROOT/fabric-config" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config/config" +} + +installChannels() { + printHeadline "Creating 'my-channel1' on Org1/peer0" "U1F63B" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; createChannelAndJoin 'my-channel1' 'Org1MSP' 'peer0.org1.example.com:7041' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" + + printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" + docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" + printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" + docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" +} + +installChaincodes() { + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + local version="0.0.1" + printHeadline "Packaging chaincode 'or-policy-chaincode'" "U1F60E" + chaincodeBuild "or-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "or-policy-chaincode" "$version" "node" printHeadline "Installing 'or-policy-chaincode' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "or-policy-chaincode" "$version" "" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "or-policy-chaincode" "$version" "" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/or-policy-chaincode.json" + printHeadline "Installing 'or-policy-chaincode' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "or-policy-chaincode" "$version" "" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/or-policy-chaincode.json" + printItalics "Committing chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "peer0.org1.example.com:7041,peer0.org2.example.com:7061" "" "collections/or-policy-chaincode.json" + else + echo "Warning! Skipping chaincode 'or-policy-chaincode' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" + fi + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + local version="0.0.1" + printHeadline "Packaging chaincode 'and-policy-chaincode'" "U1F60E" + chaincodeBuild "and-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "and-policy-chaincode" "$version" "node" printHeadline "Installing 'and-policy-chaincode' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "and-policy-chaincode" "$version" "" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "and-policy-chaincode" "$version" "" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/and-policy-chaincode.json" + printHeadline "Installing 'and-policy-chaincode' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "and-policy-chaincode" "$version" "" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/and-policy-chaincode.json" + printItalics "Committing chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "peer0.org1.example.com:7041,peer0.org2.example.com:7061" "" "collections/and-policy-chaincode.json" + else + echo "Warning! Skipping chaincode 'and-policy-chaincode' installation. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" + fi + +} + +installChaincode() { + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" + exit 1 + fi + + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" + exit 1 + fi + + if [ "$chaincodeName" = "or-policy-chaincode" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'or-policy-chaincode'" "U1F60E" + chaincodeBuild "or-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "or-policy-chaincode" "$version" "node" printHeadline "Installing 'or-policy-chaincode' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "or-policy-chaincode" "$version" "" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "or-policy-chaincode" "$version" "" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/or-policy-chaincode.json" + printHeadline "Installing 'or-policy-chaincode' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "or-policy-chaincode" "$version" "" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/or-policy-chaincode.json" + printItalics "Committing chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "peer0.org1.example.com:7041,peer0.org2.example.com:7061" "" "collections/or-policy-chaincode.json" + + else + echo "Warning! Skipping chaincode 'or-policy-chaincode' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" + fi + fi + if [ "$chaincodeName" = "and-policy-chaincode" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'and-policy-chaincode'" "U1F60E" + chaincodeBuild "and-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "and-policy-chaincode" "$version" "node" printHeadline "Installing 'and-policy-chaincode' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "and-policy-chaincode" "$version" "" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "and-policy-chaincode" "$version" "" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/and-policy-chaincode.json" + printHeadline "Installing 'and-policy-chaincode' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "and-policy-chaincode" "$version" "" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/and-policy-chaincode.json" + printItalics "Committing chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "peer0.org1.example.com:7041,peer0.org2.example.com:7061" "" "collections/and-policy-chaincode.json" + + else + echo "Warning! Skipping chaincode 'and-policy-chaincode' install. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" + fi + fi +} + +runDevModeChaincode() { + local chaincodeName=$1 + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" + exit 1 + fi + + if [ "$chaincodeName" = "or-policy-chaincode" ]; then + local version="0.0.1" + printHeadline "Approving 'or-policy-chaincode' for Org1 (dev mode)" "U1F60E" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/or-policy-chaincode.json" + printHeadline "Approving 'or-policy-chaincode' for Org2 (dev mode)" "U1F60E" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "0.0.1" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/or-policy-chaincode.json" + printItalics "Committing chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1' (dev mode)" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "0.0.1" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "peer0.org1.example.com:7041,peer0.org2.example.com:7061" "" "collections/or-policy-chaincode.json" + + fi + if [ "$chaincodeName" = "and-policy-chaincode" ]; then + local version="0.0.1" + printHeadline "Approving 'and-policy-chaincode' for Org1 (dev mode)" "U1F60E" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/and-policy-chaincode.json" + printHeadline "Approving 'and-policy-chaincode' for Org2 (dev mode)" "U1F60E" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "0.0.1" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/and-policy-chaincode.json" + printItalics "Committing chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1' (dev mode)" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "0.0.1" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "peer0.org1.example.com:7041,peer0.org2.example.com:7061" "" "collections/and-policy-chaincode.json" + + fi +} + +upgradeChaincode() { + local chaincodeName="$1" + if [ -z "$chaincodeName" ]; then + echo "Error: chaincode name is not provided" + exit 1 + fi + + local version="$2" + if [ -z "$version" ]; then + echo "Error: chaincode version is not provided" + exit 1 + fi + + if [ "$chaincodeName" = "or-policy-chaincode" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'or-policy-chaincode'" "U1F60E" + chaincodeBuild "or-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "or-policy-chaincode" "$version" "node" printHeadline "Installing 'or-policy-chaincode' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "or-policy-chaincode" "$version" "" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "or-policy-chaincode" "$version" "" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/or-policy-chaincode.json" + printHeadline "Installing 'or-policy-chaincode' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "or-policy-chaincode" "$version" "" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "or-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/or-policy-chaincode.json" + printItalics "Committing chaincode 'or-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "or-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "OR('Org1MSP.member', 'Org2MSP.member')" "false" "" "peer0.org1.example.com:7041,peer0.org2.example.com:7061" "" "collections/or-policy-chaincode.json" + + else + echo "Warning! Skipping chaincode 'or-policy-chaincode' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" + fi + fi + if [ "$chaincodeName" = "and-policy-chaincode" ]; then + if [ -n "$(ls "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node")" ]; then + printHeadline "Packaging chaincode 'and-policy-chaincode'" "U1F60E" + chaincodeBuild "and-policy-chaincode" "node" "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node" "16" + chaincodePackage "cli.org1.example.com" "peer0.org1.example.com:7041" "and-policy-chaincode" "$version" "node" printHeadline "Installing 'and-policy-chaincode' for Org1" "U1F60E" + chaincodeInstall "cli.org1.example.com" "peer0.org1.example.com:7041" "and-policy-chaincode" "$version" "" + chaincodeInstall "cli.org1.example.com" "peer1.org1.example.com:7042" "and-policy-chaincode" "$version" "" + chaincodeApprove "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/and-policy-chaincode.json" + printHeadline "Installing 'and-policy-chaincode' for Org2" "U1F60E" + chaincodeInstall "cli.org2.example.com" "peer0.org2.example.com:7061" "and-policy-chaincode" "$version" "" + chaincodeApprove "cli.org2.example.com" "peer0.org2.example.com:7061" "my-channel1" "and-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "collections/and-policy-chaincode.json" + printItalics "Committing chaincode 'and-policy-chaincode' on channel 'my-channel1' as 'Org1'" "U1F618" + chaincodeCommit "cli.org1.example.com" "peer0.org1.example.com:7041" "my-channel1" "and-policy-chaincode" "$version" "orderer0.group1.orderer.example.com:7030" "AND('Org1MSP.member', 'Org2MSP.member')" "false" "" "peer0.org1.example.com:7041,peer0.org2.example.com:7061" "" "collections/and-policy-chaincode.json" + + else + echo "Warning! Skipping chaincode 'and-policy-chaincode' upgrade. Chaincode directory is empty." + echo "Looked in dir: '$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node'" + fi + fi +} + +notifyOrgsAboutChannels() { + printHeadline "Creating new channel config blocks" "U1F537" + createNewChannelUpdateTx "my-channel1" "Org1MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + createNewChannelUpdateTx "my-channel1" "Org2MSP" "MyChannel1" "$FABLO_NETWORK_ROOT/fabric-config" "$FABLO_NETWORK_ROOT/fabric-config/config" + + printHeadline "Notyfing orgs about channels" "U1F4E2" + notifyOrgAboutNewChannel "my-channel1" "Org1MSP" "cli.org1.example.com" "peer0.org1.example.com" "orderer0.group1.orderer.example.com:7030" + notifyOrgAboutNewChannel "my-channel1" "Org2MSP" "cli.org2.example.com" "peer0.org2.example.com" "orderer0.group1.orderer.example.com:7030" + + printHeadline "Deleting new channel config blocks" "U1F52A" + deleteNewChannelUpdateTx "my-channel1" "Org1MSP" "cli.org1.example.com" + deleteNewChannelUpdateTx "my-channel1" "Org2MSP" "cli.org2.example.com" +} + +printStartSuccessInfo() { + printHeadline "Done! Enjoy your fresh network" "U1F984" +} + +stopNetwork() { + printHeadline "Stopping network" "U1F68F" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose stop) + sleep 4 +} + +networkDown() { + printHeadline "Destroying network" "U1F916" + (cd "$FABLO_NETWORK_ROOT"/fabric-docker && docker compose down) + + printf "Removing chaincode containers & images... \\U1F5D1 \\n" + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-or-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" + done + for image in $(docker images "dev-peer0.org1.example.com-or-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" + done + for container in $(docker ps -a | grep "dev-peer1.org1.example.com-or-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" + done + for image in $(docker images "dev-peer1.org1.example.com-or-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" + done + for container in $(docker ps -a | grep "dev-peer0.org2.example.com-or-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" + done + for image in $(docker images "dev-peer0.org2.example.com-or-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" + done + for container in $(docker ps -a | grep "dev-peer0.org1.example.com-and-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" + done + for image in $(docker images "dev-peer0.org1.example.com-and-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" + done + for container in $(docker ps -a | grep "dev-peer1.org1.example.com-and-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" + done + for image in $(docker images "dev-peer1.org1.example.com-and-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" + done + for container in $(docker ps -a | grep "dev-peer0.org2.example.com-and-policy-chaincode" | awk '{print $1}'); do + echo "Removing container $container..." + docker rm -f "$container" || echo "docker rm of $container failed. Check if all fabric dockers properly was deleted" + done + for image in $(docker images "dev-peer0.org2.example.com-and-policy-chaincode*" -q); do + echo "Removing image $image..." + docker rmi "$image" || echo "docker rmi of $image failed. Check if all fabric dockers properly was deleted" + done + + printf "Removing generated configs... \\U1F5D1 \\n" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/crypto-config" + rm -rf "$FABLO_NETWORK_ROOT/fabric-config/chaincode-packages" + + printHeadline "Done! Network was purged" "U1F5D1" +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/docker-compose.yaml from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"version: '2.2' + +networks: + basic: + +services: + + ca.orderer.example.com: + container_name: ca.orderer.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.orderer.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.orderer.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7020:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORDERER_CA_ADMIN_NAME}:\${ORDERER_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.orderer.example.com: + container_name: cli.orderer.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.orderer.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=OrdererMSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@orderer.example.com/msp + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/or-policy-chaincode/" + - "../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/and-policy-chaincode/" + - "../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json" + networks: + - basic + + orderer0.group1.orderer.example.com: + container_name: orderer0.group1.orderer.example.com + image: hyperledger/fabric-orderer:\${FABRIC_VERSION} + environment: + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 + - ORDERER_GENERAL_LISTENPORT=7030 + - ORDERER_GENERAL_GENESISMETHOD=file + - ORDERER_GENERAL_BOOTSTRAPFILE=/var/hyperledger/config/Group1Genesis.block + - ORDERER_GENERAL_LOCALMSPID=OrdererMSP + - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp + - GODEBUG=netdns=go + working_dir: /var/hyperledger/orderer + command: orderer + ports: + - 7030:7030 + - 8030:9440 + volumes: + - ../fabric-config/config/:/var/hyperledger/config + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/msp/:/var/hyperledger/orderer/msp + - ../fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/:/var/hyperledger/orderer/tls + networks: + - basic + + ca.org1.example.com: + container_name: ca.org1.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org1.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7040:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG1_CA_ADMIN_NAME}:\${ORG1_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org1.example.com: + container_name: cli.org1.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org1.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org1.example.com/msp + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/or-policy-chaincode/" + - "../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/and-policy-chaincode/" + - "../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json" + networks: + - basic + + peer0.org1.example.com: + container_name: peer0.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer0.org1.example.com + - CORE_PEER_ADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7041 + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + # enabled gateway + - CORE_PEER_GATEWAY_ENABLED=true + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8041:9440 + - 7041:7041 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + peer1.org1.example.com: + container_name: peer1.org1.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ID=peer1.org1.example.com + - CORE_PEER_ADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_LISTENADDRESS=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_ENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7042 + - CORE_PEER_GOSSIP_BOOTSTRAP="peer0.org1.example.com:7041 peer1.org1.example.com:7042" + - CORE_PEER_CHAINCODELISTENADDRESS=peer1.org1.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer1.org1.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + # enabled gateway + - CORE_PEER_GATEWAY_ENABLED=true + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8042:9440 + - 7042:7042 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic + + ca.org2.example.com: + container_name: ca.org2.example.com + image: hyperledger/fabric-ca:\${FABRIC_CA_VERSION} + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server/crypto/ca.org2.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server/crypto/priv-key.pem + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + ports: + - 7060:7054 + working_dir: /etc/hyperledger/fabric-ca-server + command: sh -c 'fabric-ca-server start -b \${ORG2_CA_ADMIN_NAME}:\${ORG2_CA_ADMIN_PASSWORD} -d' + volumes: + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server/crypto + - ../fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml:/etc/hyperledger/fabric-ca-server/fabric-ca-server-config.yaml + networks: + - basic + + cli.org2.example.com: + container_name: cli.org2.example.com + image: hyperledger/fabric-tools:\${FABRIC_VERSION} + tty: true + environment: + - GOPATH=/opt/gopath + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + - CORE_PEER_ID=cli.org2.example.com + - CORE_CHAINCODE_KEEPALIVE=10 + # + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_MSPCONFIGPATH=/var/hyperledger/cli/crypto/users/Admin@org2.example.com/msp + - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 + working_dir: /var/hyperledger/cli/ + command: /bin/bash + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-docker/scripts/cli:/var/hyperledger/cli/scripts/ + - ../fabric-config/config:/var/hyperledger/cli/config/ # genesis.block and channel.tx's + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com:/var/hyperledger/cli/crypto/ + - ../fabric-config/chaincode-packages:/var/hyperledger/cli/chaincode-packages/ + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/or-policy-chaincode/" + - "../fabric-config/collections/or-policy-chaincode.json:/var/hyperledger/cli/collections/or-policy-chaincode.json" + - "$CHAINCODES_BASE_DIR/./chaincodes/chaincode-kv-node/:/var/hyperledger/cli/and-policy-chaincode/" + - "../fabric-config/collections/and-policy-chaincode.json:/var/hyperledger/cli/collections/and-policy-chaincode.json" + networks: + - basic + + peer0.org2.example.com: + container_name: peer0.org2.example.com + image: hyperledger/fabric-peer:\${FABRIC_VERSION} + environment: + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_ID=peer0.org2.example.com + - CORE_PEER_ADDRESS=peer0.org2.example.com:7061 + - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7061 + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7061 + - CORE_PEER_CHAINCODELISTENADDRESS=peer0.org2.example.com:7050 + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/peer/msp + - CORE_CHAINCODE_BUILDER=hyperledger/fabric-ccenv:\${FABRIC_CCENV_VERSION} + - CORE_CHAINCODE_GOLANG_RUNTIME=hyperledger/fabric-baseos:\${FABRIC_BASEOS_VERSION} + - CORE_CHAINCODE_JAVA_RUNTIME=hyperledger/fabric-javaenv:\${FABRIC_JAVAENV_VERSION} + # + - CORE_CHAINCODE_LOGGING_LEVEL=\${LOGGING_LEVEL} + - CORE_CHAINCODE_LOGGING_SHIM=\${LOGGING_LEVEL} + - FABRIC_LOGGING_SPEC=\${LOGGING_LEVEL} + # metrics + - CORE_OPERATIONS_LISTENADDRESS=peer0.org2.example.com:9440 + - CORE_METRICS_PROVIDER=prometheus + # + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=\${COMPOSE_PROJECT_NAME}_basic + - CORE_VM_DOCKER_ATTACHSTDOUT=true + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + - GODEBUG=netdns=go + # enabled gateway + - CORE_PEER_GATEWAY_ENABLED=true + working_dir: /etc/hyperledger/fabric/peer/ + command: peer node start + ports: + - 8061:9440 + - 7061:7061 + volumes: + - /var/run/docker.sock:/host/var/run/docker.sock + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/fabric/peer/msp + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls:/etc/hyperledger/fabric/peer/tls + - ../fabric-config/crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/fabric/peer/msp/users + - ../fabric-config/config:/etc/hyperledger/fabric/config + networks: + - basic +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +certsGenerate() { + local CONTAINER_NAME=certsGenerate + + local CONFIG_PATH=$1 + local CRYPTO_CONFIG_FILE_NAME=$2 + local ORG_PATH=$3 + local OUTPUT_PATH=$4 + local FULL_CERT_PATH=$OUTPUT_PATH$ORG_PATH + + echo "Generating certs..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CRYPTO_CONFIG_FILE_NAME: $CRYPTO_CONFIG_FILE_NAME" + inputLog "ORG_PATH: $ORG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "FULL_CERT_PATH: $FULL_CERT_PATH" + + if [ -d "$FULL_CERT_PATH" ]; then + echo "Can't generate certs, directory already exists : $FULL_CERT_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" + exit 1 + fi + + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME cryptogen generate --config=./fabric-config/"$CRYPTO_CONFIG_FILE_NAME" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/crypto-config/. "$OUTPUT_PATH" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME + + # shellcheck disable=2044 + for file in $(find "$OUTPUT_PATH"/ -iname '*_sk'); do + dir=$(dirname "$file") + mv "\${dir}"/*_sk "\${dir}"/priv-key.pem + done +} + +genesisBlockCreate() { + local CONTAINER_NAME=genesisBlockCreate + + local CONFIG_PATH=$1 + local OUTPUT_PATH=$2 + local GENESIS_PROFILE_NAME=$3 + local GENESIS_FILE_NAME=$GENESIS_PROFILE_NAME.block + + echo "Creating genesis block..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "GENESIS_PROFILE_NAME: $GENESIS_PROFILE_NAME" + inputLog "GENESIS_FILE_NAME: $GENESIS_FILE_NAME" + + if [ -f "$OUTPUT_PATH/$GENESIS_FILE_NAME" ]; then + echo "Cant't generate genesis block, file already exists: $OUTPUT_PATH/$GENESIS_FILE_NAME" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" + exit 1 + fi + + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "$GENESIS_PROFILE_NAME" -outputBlock "./config/$GENESIS_FILE_NAME" -channelID system-channel || removeContainer $CONTAINER_NAME + + mkdir -p "$OUTPUT_PATH" + docker cp "$CONTAINER_NAME:/config/$GENESIS_FILE_NAME" "$OUTPUT_PATH/$GENESIS_FILE_NAME" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createChannelTx() { + local CONTAINER_NAME=createChannelTx + + local CHANNEL_NAME=$1 + local CONFIG_PATH=$2 + local CONFIG_PROFILE=$3 + local OUTPUT_PATH=$4 + local CHANNEL_TX_PATH="$OUTPUT_PATH/$CHANNEL_NAME".tx + + echo "Creating channelTx for $CHANNEL_NAME..." + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "CHANNEL_TX_PATH: $CHANNEL_TX_PATH" + + if [ -f "$CHANNEL_TX_PATH" ]; then + echo "Can't create channel configuration, it already exists : $CHANNEL_TX_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" + exit 1 + fi + + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen --configPath ./fabric-config -profile "\${CONFIG_PROFILE}" -outputCreateChannelTx ./config/channel.tx -channelID "\${CHANNEL_NAME}" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/channel.tx "$CHANNEL_TX_PATH" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +createNewChannelUpdateTx() { + local CONTAINER_NAME=createAnchorPeerUpdateTx + + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CONFIG_PROFILE=$3 + local CONFIG_PATH=$4 + local OUTPUT_PATH=$5 + local ANCHOR_PEER_UPDATE_PATH="$OUTPUT_PATH/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Creating new channel config block. Channel: $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CONFIG_PROFILE: $CONFIG_PROFILE" + inputLog "CONFIG_PATH: $CONFIG_PATH" + inputLog "OUTPUT_PATH: $OUTPUT_PATH" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -f "$ANCHOR_PEER_UPDATE_PATH" ]; then + echo "Cant't create anchor peer update, it already exists : $ANCHOR_PEER_UPDATE_PATH" + echo "Try using 'reset' or 'down' to remove whole network or 'start' to reuse it" + exit 1 + fi + + docker run -i -d -w="/" --name $CONTAINER_NAME hyperledger/fabric-tools:"\${FABRIC_VERSION}" bash || removeContainer $CONTAINER_NAME + docker cp "$CONFIG_PATH" $CONTAINER_NAME:/fabric-config || removeContainer $CONTAINER_NAME + + docker exec -i $CONTAINER_NAME mkdir /config || removeContainer $CONTAINER_NAME + docker exec -i $CONTAINER_NAME configtxgen \\ + --configPath ./fabric-config \\ + -profile "\${CONFIG_PROFILE}" \\ + -outputAnchorPeersUpdate ./config/"\${MSP_NAME}"anchors.tx \\ + -channelID "\${CHANNEL_NAME}" \\ + -asOrg "\${MSP_NAME}" || removeContainer $CONTAINER_NAME + + docker cp $CONTAINER_NAME:/config/"\${MSP_NAME}"anchors.tx "$ANCHOR_PEER_UPDATE_PATH" || removeContainer $CONTAINER_NAME + + removeContainer $CONTAINER_NAME +} + +notifyOrgAboutNewChannel() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" + else + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" + fi +} + +notifyOrgAboutNewChannelTls() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local PEER_ADDRESS=$4 + local ORDERER_URL=$5 + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + local CA_CERT="/var/hyperledger/cli/"\${6} + + echo "Updating channel $CHANNEL_NAME for organization $MSP_NAME (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "MSP_NAME: $MSP_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel update \\ + -c "$CHANNEL_NAME" \\ + -o "$ORDERER_URL" \\ + -f "$ANCHOR_PEER_UPDATE_PATH" \\ + --tls --cafile "$CA_CERT" + else + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" + fi +} + +deleteNewChannelUpdateTx() { + local CHANNEL_NAME=$1 + local MSP_NAME=$2 + local CLI_NAME=$3 + local ANCHOR_PEER_UPDATE_PATH="/var/hyperledger/cli/config/\${MSP_NAME}anchors-$CHANNEL_NAME.tx" + + echo "Deleting new channel config block. Channel: $CHANNEL_NAME, Organization: $MSP_NAME" + inputLogShort "CHANNEL_NAME: $CHANNEL_NAME, MSP_NAME: $MSP_NAME, CLI_NAME: $CLI_NAME, ANCHOR_PEER_UPDATE_PATH: $ANCHOR_PEER_UPDATE_PATH" + + if [ -n "$ANCHOR_PEER_UPDATE_PATH" ]; then + docker exec "$CLI_NAME" rm "$ANCHOR_PEER_UPDATE_PATH" + else + echo "channel update tx not found! Looked for: $ANCHOR_PEER_UPDATE_PATH" + fi +} + +printHeadline() { + bold=$'\\e[1m' + end=$'\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf "\${bold}============ %b %s %b ==============\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" +} + +printItalics() { + italics=$'\\e[3m' + end=$'\\e[0m' + + TEXT=$1 + EMOJI=$2 + printf "\${italics}==== %b %s %b ====\${end}\\n" "\\\\$EMOJI" "$TEXT" "\\\\$EMOJI" +} + +inputLog() { + end=$'\\e[0m' + darkGray=$'\\e[90m' + + echo "\${darkGray} $1 \${end}" +} + +inputLogShort() { + end=$'\\e[0m' + darkGray=$'\\e[90m' + + echo "\${darkGray} $1 \${end}" +} + +certsRemove() { + local CERTS_DIR_PATH=$1 + rm -rf "$CERTS_DIR_PATH" +} + +removeContainer() { + CONTAINER_NAME=$1 + docker rm -f "$CONTAINER_NAME" +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +printHelp() { + echo "Fablo is powered by SoftwareMill" + + echo "" + echo "usage: ./fabric-docker.sh " + echo "" + + echo "Commands: " + echo "" + echo "./fabric-docker.sh up" + echo -e "\\t Use for first run. Creates all needed artifacts (certs, genesis block) and starts network for the first time." + echo -e "\\t After 'up' commands start/stop are used to manage network and rerun to rerun it" + echo "" + echo "./fabric-docker.sh down" + echo -e "\\t Back to empty state - destorys created containers, prunes generated certificates, configs." + echo "" + echo "./fabric-docker.sh start" + echo -e "\\t Starts already created network." + echo "" + echo "./fabric-docker.sh stop" + echo -e "\\t Stops already running network." + echo "" + echo "./fabric-docker.sh reset" + echo -e "\\t Fresh start - it destroys whole network, certs, configs and then reruns everything." + echo "" + echo "./fabric-docker.sh channel --help" + echo -e "\\t Detailed help for channel management scripts." + echo "" +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash +# phrase "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" is needed in older bash versions ( <4 ) for array expansion. +# see: https://stackoverflow.com/questions/7577052/bash-empty-array-expansion-with-set-u + +dockerPullIfMissing() { + local IMAGE="$1" + if [[ "$(docker images -q "$IMAGE" 2>/dev/null)" == "" ]]; then + docker pull --platform linux/x86_64 "$IMAGE" + fi +} + +chaincodeBuild() { + local CHAINCODE_NAME=$1 + local CHAINCODE_LANG=$2 + local CHAINCODE_DIR_PATH=$3 + local RECOMMENDED_NODE_VERSION=$4 + + mkdir -p "$CHAINCODE_DIR_PATH" + + # pull required images upfront in case of arm64 (Apple Silicon) architecture + # see https://stackoverflow.com/questions/69699421/hyperledger-fabric-chaincode-installation-failed-no-matching-manifest-for-linu + if [ "$(uname -m)" = "arm64" ]; then + if [ "$CHAINCODE_LANG" = "node" ]; then + dockerPullIfMissing "hyperledger/fabric-nodeenv:$FABRIC_NODEENV_VERSION" + fi + if [ "$CHAINCODE_LANG" = "java" ]; then + dockerPullIfMissing "hyperledger/fabric-javaenv:$FABRIC_JAVAENV_VERSION" + fi + if [ "$CHAINCODE_LANG" = "golang" ]; then + dockerPullIfMissing "hyperledger/fabric-baseos:$FABRIC_BASEOS_VERSION" + fi + fi + + if [ "$CHAINCODE_LANG" = "node" ]; then + + NODE_VERSION="$(node --version)" + + USES_OLD_FABRIC_SHIM="$(jq '.dependencies."fabric-shim" | contains("1.4.")' "$CHAINCODE_DIR_PATH/package.json")" + if [ "$USES_OLD_FABRIC_SHIM" == "true" ]; then + RECOMMENDED_NODE_VERSION="8.9" + fi + + if ! echo "$NODE_VERSION" | grep -q "v$RECOMMENDED_NODE_VERSION"; then + echo "Warning: Your Node.js version is $NODE_VERSION, but recommended is $RECOMMENDED_NODE_VERSION)" + echo "See: https://github.com/hyperledger/fabric-chaincode-node/blob/main/COMPATIBILITY.md" + fi + + echo "Buiding chaincode '$CHAINCODE_NAME'..." + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "CHAINCODE_DIR_PATH: $CHAINCODE_DIR_PATH" + inputLog "NODE_VERSION: $NODE_VERSION (recommended: $RECOMMENDED_NODE_VERSION)" + + # Default to using npm for installation and build + (cd "$CHAINCODE_DIR_PATH" && npm install && npm run build) + + fi +} + +chaincodePackage() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHAINCODE_NAME=$3 + local CHAINCODE_VERSION=$4 + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" + local CHAINCODE_LANG=$5 + + echo "Packaging chaincode $CHAINCODE_NAME..." + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "CHAINCODE_LANG: $CHAINCODE_LANG" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CLI_NAME: $CLI_NAME" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode package \\ + "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" \\ + --path "/var/hyperledger/cli/$CHAINCODE_NAME/" \\ + --lang "$CHAINCODE_LANG" \\ + --label "$CHAINCODE_LABEL" + + # set package owner as current (host) user to fix permission issues + docker exec "$CLI_NAME" chown "$(id -u):$(id -g)" "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" +} + +chaincodeInstall() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHAINCODE_NAME=$3 + local CHAINCODE_VERSION=$4 + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" + local CA_CERT=$5 + + echo "Installing chaincode $CHAINCODE_NAME..." + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CA_CERT: $CA_CERT" + + local CA_CERT_PARAMS=() + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tlsRootCertFiles "/var/hyperledger/cli/$CA_CERT") + fi + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode install \\ + "/var/hyperledger/cli/chaincode-packages/$CHAINCODE_LABEL.tar.gz" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" +} + +chaincodeApprove() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME="$3" + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local CHAINCODE_LABEL="\${CHAINCODE_NAME}_$CHAINCODE_VERSION" + local ORDERER_URL=$6 + local ENDORSEMENT=$7 + local INIT_REQUIRED=$8 + local CA_CERT=$9 + local COLLECTIONS_CONFIG=\${10} + + echo "Approving chaincode $CHAINCODE_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "INIT_REQUIRED: $INIT_REQUIRED" + inputLog "CA_CERT: $CA_CERT" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + + local CA_CERT_PARAMS=() + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") + fi + + local ENDORSEMENT_PARAMS=() + if [ -n "$ENDORSEMENT" ]; then + ENDORSEMENT_PARAMS=(--signature-policy "$ENDORSEMENT") + fi + + local INIT_REQUIRED_PARAMS=() + if [ "$INIT_REQUIRED" = "true" ]; then + INIT_REQUIRED_PARAMS=(--init-required) + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") + fi + + local QUERYINSTALLED_RESPONSE + local CC_PACKAGE_ID + + QUERYINSTALLED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode queryinstalled \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + CC_PACKAGE_ID="$(jq ".installed_chaincodes | [.[]? | select(.label==\\"$CHAINCODE_LABEL\\") ][0].package_id // \\"\\"" -r <<<"$QUERYINSTALLED_RESPONSE")" + if [ -z "$CC_PACKAGE_ID" ]; then + CC_PACKAGE_ID="$CHAINCODE_NAME:$CHAINCODE_VERSION" + fi + inputLog "CC_PACKAGE_ID: $CC_PACKAGE_ID" + + local QUERYCOMMITTED_RESPONSE + local SEQUENCE + + QUERYCOMMITTED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + SEQUENCE="$(jq ".chaincode_definitions | [.[]? | select(.name==\\"$CHAINCODE_NAME\\").sequence ] | max | select(.!= null)" -r <<<"$QUERYCOMMITTED_RESPONSE")" + SEQUENCE=$((SEQUENCE + 1)) + inputLog "SEQUENCE: $SEQUENCE" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" -e CC_PACKAGE_ID="$CC_PACKAGE_ID" "$CLI_NAME" peer lifecycle chaincode approveformyorg \\ + -o "$ORDERER_URL" \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + --package-id "$CC_PACKAGE_ID" \\ + --sequence "$SEQUENCE" \\ + "\${ENDORSEMENT_PARAMS[@]+"\${ENDORSEMENT_PARAMS[@]}"}" \\ + "\${INIT_REQUIRED_PARAMS[@]+"\${INIT_REQUIRED_PARAMS[@]}"}" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" +} + +chaincodeCommit() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME="$3" + local CHAINCODE_NAME=$4 + local CHAINCODE_VERSION=$5 + local ORDERER_URL=$6 + local ENDORSEMENT=$7 + local INIT_REQUIRED=$8 + local CA_CERT=$9 + local COMMIT_PEER_ADDRESSES=\${10} + local TLS_ROOT_CERT_FILES=\${11} + local COLLECTIONS_CONFIG=\${12} + + echo "Committing chaincode $CHAINCODE_NAME..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CHAINCODE_NAME: $CHAINCODE_NAME" + inputLog "CHAINCODE_VERSION: $CHAINCODE_VERSION" + inputLog "ORDERER_URL: $ORDERER_URL" + inputLog "ENDORSEMENT: $ENDORSEMENT" + inputLog "INIT_REQUIRED: $INIT_REQUIRED" + inputLog "CA_CERT: $CA_CERT" + inputLog "COMMIT_PEER_ADDRESSES: $COMMIT_PEER_ADDRESSES" + inputLog "TLS_ROOT_CERT_FILES: $TLS_ROOT_CERT_FILES" + inputLog "COLLECTIONS_CONFIG: $COLLECTIONS_CONFIG" + + local CA_CERT_PARAMS=() + if [ -n "$CA_CERT" ]; then + CA_CERT_PARAMS=(--tls --cafile "/var/hyperledger/cli/$CA_CERT") + fi + + local COMMIT_PEER_PARAMS=() + if [ -n "$COMMIT_PEER_ADDRESSES" ]; then + # shellcheck disable=SC2207 + COMMIT_PEER_PARAMS=($(echo ",$COMMIT_PEER_ADDRESSES" | sed 's/,/ --peerAddresses /g')) + fi + + local TLS_ROOT_CERT_PARAMS=() + if [ -n "$TLS_ROOT_CERT_FILES" ]; then + # shellcheck disable=SC2207 + TLS_ROOT_CERT_PARAMS=(--tls $(echo ",$TLS_ROOT_CERT_FILES" | sed 's/,/ --tlsRootCertFiles \\/var\\/hyperledger\\/cli\\//g')) + fi + + local ENDORSEMENT_PARAMS=() + if [ -n "$ENDORSEMENT" ]; then + ENDORSEMENT_PARAMS=(--signature-policy "$ENDORSEMENT") + fi + + local INIT_REQUIRED_PARAMS=() + if [ "$INIT_REQUIRED" = "true" ]; then + INIT_REQUIRED_PARAMS=(--init-required) + fi + + local COLLECTIONS_CONFIG_PARAMS=() + if [ -n "$COLLECTIONS_CONFIG" ]; then + COLLECTIONS_CONFIG_PARAMS=(--collections-config "$COLLECTIONS_CONFIG") + fi + + local QUERYCOMMITTED_RESPONSE + local SEQUENCE + + QUERYCOMMITTED_RESPONSE="$( + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --output json \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" + )" + SEQUENCE="$(jq ".chaincode_definitions | [.[]? | select(.name==\\"$CHAINCODE_NAME\\").sequence ] | max | select(.!= null)" -r <<<"$QUERYCOMMITTED_RESPONSE")" + SEQUENCE=$((SEQUENCE + 1)) + inputLog "SEQUENCE: $SEQUENCE" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode commit \\ + -o "$ORDERER_URL" \\ + -C "$CHANNEL_NAME" \\ + -n "$CHAINCODE_NAME" \\ + -v "$CHAINCODE_VERSION" \\ + --sequence "$SEQUENCE" \\ + "\${ENDORSEMENT_PARAMS[@]+"\${ENDORSEMENT_PARAMS[@]}"}" \\ + "\${INIT_REQUIRED_PARAMS[@]+"\${INIT_REQUIRED_PARAMS[@]}"}" \\ + "\${COLLECTIONS_CONFIG_PARAMS[@]+"\${COLLECTIONS_CONFIG_PARAMS[@]}"}" \\ + "\${COMMIT_PEER_PARAMS[@]+"\${COMMIT_PEER_PARAMS[@]}"}" \\ + "\${TLS_ROOT_CERT_PARAMS[@]+"\${TLS_ROOT_CERT_PARAMS[@]}"}" \\ + "\${CA_CERT_PARAMS[@]+"\${CA_CERT_PARAMS[@]}"}" +} + +peerChaincodeList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + + # Execute the command to list chaincodes + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" +} + +peerChaincodeListTls() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CHANNEL_NAME=$3 + local CA_CERT=$4 + + echo "Chaincodes list:" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CA_CERT: $CA_CERT" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer lifecycle chaincode querycommitted \\ + --channelID "$CHANNEL_NAME" \\ + --tls \\ + --cafile "/var/hyperledger/cli/$CA_CERT" +} + +# Function to perform chaincode invoke +peerChaincodeInvoke() { + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" + + # shellcheck disable=SC2086 + docker exec "$CLI" peer chaincode invoke \\ + $PEER_ADDRESSES \\ + -C "$CHANNEL" \\ + -n "$CHAINCODE" \\ + -c "$COMMAND" \\ + --transient "$TRANSIENT" \\ + --waitForEvent \\ + --waitForEventTimeout 90s \\ + 2>&1 +} +# Function to perform chaincode invoke for Tls +peerChaincodeInvokeTls() { + local CLI="$1" + local PEERS="$2" + local CHANNEL="$3" + local CHAINCODE="$4" + local COMMAND="$5" + local TRANSIENT="$6" + local PEER_CERTS="$7" + local CA_CERT="$8" + + echo "Chaincode invoke:" + inputLog "CLI: $CLI" + inputLog "PEERS: $PEERS" + inputLog "CHANNEL: $CHANNEL" + inputLog "CHAINCODE: $CHAINCODE" + inputLog "COMMAND: $COMMAND" + inputLog "TRANSIENT: $TRANSIENT" + inputLog "PEER_CERTS: $PEER_CERTS" + inputLog "CA_CERT: $CA_CERT" + + PEER_ADDRESSES="--peerAddresses $(echo "$PEERS" | sed 's/,/ --peerAddresses /g')" + + TLS_ROOT_CERT_FILES="--tlsRootCertFiles /var/hyperledger/cli/$(echo "$PEER_CERTS" | sed 's/,/ --tlsRootCertFiles \\/var\\/hyperledger\\/cli\\//g')" + + # shellcheck disable=SC2086 + docker exec "$CLI" peer chaincode invoke \\ + $PEER_ADDRESSES \\ + $TLS_ROOT_CERT_FILES \\ + -C "$CHANNEL" \\ + -n "$CHAINCODE" \\ + -c "$COMMAND" \\ + --transient "$TRANSIENT" \\ + --waitForEvent \\ + --waitForEventTimeout 90s \\ + --tls \\ + --cafile "/var/hyperledger/cli/$CA_CERT" \\ + 2>&1 +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +peerChannelList() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list +} + +peerChannelGetInfo() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" +} + +peerChannelFetchConfig() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ + --type common.Block | + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlock() { + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local TARGET_FILE="$5" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" + + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" + + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ +} + +#=== TLS equivalents ========================================================= + +peerChannelListTls() { + local CLI_NAME=$1 + local PEER_ADDRESS=$2 + local CA_CERT=$3 + + echo "Listing channels using $CLI_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel list --tls --cafile "$CA_CERT" +} + +peerChannelGetInfoTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local PEER_ADDRESS=$3 + local CA_CERT=$4 + + echo "Getting info about $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" "$CLI_NAME" peer channel getinfo \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" +} + +peerChannelFetchConfigTls() { + local CHANNEL_NAME=$1 + local CLI_NAME=$2 + local CONFIG_FILE_NAME=$3 + local PEER_ADDRESS=$4 + local CA_CERT=$5 + + echo "Fetching config block from $CHANNEL_NAME using peer $PEER_ADDRESS (TLS)..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "CONFIG_FILE_NAME: $CONFIG_FILE_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/assets/ + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch config /tmp/hyperledger/assets/config_block_before.pb \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" chmod 777 /tmp/hyperledger/assets/config_block_before.pb + docker exec \\ + -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" configtxlator proto_decode \\ + --input /tmp/hyperledger/assets/config_block_before.pb \\ + --type common.Block | + jq .data.data[0].payload.data.config >"$CONFIG_FILE_NAME" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/assets/ +} + +peerChannelFetchBlockTls() { + local CHANNEL_NAME="$1" + local CLI_NAME="$2" + local BLOCK_NAME="$3" + local PEER_ADDRESS="$4" + local CA_CERT="$5" + local TARGET_FILE="$6" + local TEMP_FILE="/tmp/hyperledger/blocks/$BLOCK_NAME.block" + + echo "Fetching block $BLOCK_NAME from $CHANNEL_NAME using peer $PEER_ADDRESS..." + inputLog "CHANNEL_NAME: $CHANNEL_NAME" + inputLog "CLI_NAME: $CLI_NAME" + inputLog "BLOCK_NAME: $BLOCK_NAME" + inputLog "PEER_ADDRESS: $PEER_ADDRESS" + inputLog "TARGET_FILE: $TARGET_FILE" + + docker exec "$CLI_NAME" mkdir -p /tmp/hyperledger/blocks/ + + docker exec -e CORE_PEER_ADDRESS="$PEER_ADDRESS" \\ + "$CLI_NAME" peer channel fetch "$BLOCK_NAME" "$TEMP_FILE" \\ + -c "$CHANNEL_NAME" --tls --cafile "$CA_CERT" + + docker exec "$CLI_NAME" cat "$TEMP_FILE" >"$TARGET_FILE" + + docker exec "$CLI_NAME" rm -rf /tmp/hyperledger/blocks/ +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +set -eu + +createChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + + local ORDERER_URL=$5 + + local DIR_NAME=step-createChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo "Creating channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + + mkdir "$DIR_NAME" && cd "$DIR_NAME" + + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . + + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx + peer channel join -b "\${CHANNEL_NAME}".block + + rm -rf "$DIR_NAME" +} + +createChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-createChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo "Creating channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" + + mkdir "$DIR_NAME" && cd "$DIR_NAME" + + cp /var/hyperledger/cli/config/"$CHANNEL_NAME".tx . + + peer channel create -o "\${ORDERER_URL}" -c "\${CHANNEL_NAME}" -f ./"$CHANNEL_NAME".tx --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}".block --tls --cafile "$TLS_CA_CERT_PATH" + + rm -rf "$DIR_NAME" +} + +fetchChannelAndJoin() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + + local ORDERER_URL=$5 + + local DIR_NAME=step-fetchChannelAndJoin-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo "Fetching channel with name: \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + + mkdir "$DIR_NAME" && cd "$DIR_NAME" + + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" + peer channel join -b "\${CHANNEL_NAME}"_newest.block + + rm -rf "$DIR_NAME" +} + +fetchChannelAndJoinTls() { + local CHANNEL_NAME=$1 + + local CORE_PEER_LOCALMSPID=$2 + local CORE_PEER_ADDRESS=$3 + local CORE_PEER_MSPCONFIGPATH=$(realpath "$4") + local CORE_PEER_TLS_MSPCONFIGPATH=$(realpath "$5") + local TLS_CA_CERT_PATH=$(realpath "$6") + local ORDERER_URL=$7 + + local CORE_PEER_TLS_CERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.crt + local CORE_PEER_TLS_KEY_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/client.key + local CORE_PEER_TLS_ROOTCERT_FILE=$CORE_PEER_TLS_MSPCONFIGPATH/ca.crt + + local DIR_NAME=step-fetchChannelAndJoinTls-$CHANNEL_NAME-$CORE_PEER_ADDRESS + + echo "Fetching channel with name (TLS): \${CHANNEL_NAME}" + echo " Orderer: $ORDERER_URL" + echo " CORE_PEER_LOCALMSPID: $CORE_PEER_LOCALMSPID" + echo " CORE_PEER_ADDRESS: $CORE_PEER_ADDRESS" + echo " CORE_PEER_MSPCONFIGPATH: $CORE_PEER_MSPCONFIGPATH" + echo " TLS_CA_CERT_PATH is: $TLS_CA_CERT_PATH" + echo " CORE_PEER_TLS_CERT_FILE: $CORE_PEER_TLS_CERT_FILE" + echo " CORE_PEER_TLS_KEY_FILE: $CORE_PEER_TLS_KEY_FILE" + echo " CORE_PEER_TLS_ROOTCERT_FILE: $CORE_PEER_TLS_ROOTCERT_FILE" + + mkdir "$DIR_NAME" && cd "$DIR_NAME" + + peer channel fetch newest -c "\${CHANNEL_NAME}" --orderer "\${ORDERER_URL}" --tls --cafile "$TLS_CA_CERT_PATH" + peer channel join -b "\${CHANNEL_NAME}"_newest.block --tls --cafile "$TLS_CA_CERT_PATH" + + rm -rf "$DIR_NAME" +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +__getOrdererAndPeerNodes() { + echo " + orderer0.group1.orderer.example.com + peer0.org1.example.com + peer1.org1.example.com + peer0.org2.example.com + " +} + +__getCASQLiteNodes() { + echo " + ca.orderer.example.com + ca.org1.example.com + ca.org2.example.com + " +} + +__getCAPostgresNodes() { + echo " + " +} + +__createSnapshot() { + cd "$FABLO_NETWORK_ROOT/.." + backup_dir="\${1:-"snapshot-$(date -u +"%Y%m%d%H%M%S")"}" + + if [ -d "$backup_dir" ] && [ "$(ls -A "$backup_dir")" ]; then + echo "Error: Directory '$backup_dir' already exists and is not empty!" + exit 1 + fi + + mkdir -p "$backup_dir" + cp -R ./fablo-target "$backup_dir/" + + for node in $(__getCASQLiteNodes); do + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node" + docker cp "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" "$backup_dir/$node/fabric-ca-server.db" + done + + for node in $(__getCAPostgresNodes); do + echo "Saving state of $node..." + mkdir -p "$backup_dir/$node/pg-data" + docker exec "$node" pg_dump -c --if-exists -U postgres fabriccaserver >"$backup_dir/$node/fabriccaserver.sql" + done + + for node in $(__getOrdererAndPeerNodes); do + echo "Saving state of $node..." + docker cp "$node:/var/hyperledger/production/" "$backup_dir/$node/" + done +} + +__cloneSnapshot() { + cd "$FABLO_NETWORK_ROOT/.." + target_dir="$1" + hook_cmd="$2" + + if [ -d "$target_dir/fablo-target" ]; then + echo "Error: Directory '$target_dir/fablo-target' already exists! Execute 'fablo prune' to remove the current network." + exit 1 + fi + + cp -R ./fablo-target "$target_dir/fablo-target" + + if [ -n "$hook_cmd" ]; then + echo "Executing pre-restore hook: '$hook_cmd'" + (cd "$target_dir" && eval "$hook_cmd") + fi + + (cd "$target_dir/fablo-target/fabric-docker" && docker compose up --no-start) + + for node in $(__getCASQLiteNodes); do + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" + else + docker cp "./$node/fabric-ca-server.db" "$node:/etc/hyperledger/fabric-ca-server/fabric-ca-server.db" + fi + done + + for node in $(__getCAPostgresNodes); do + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" + else + docker cp "./$node/fabriccaserver.sql" "$node:/docker-entrypoint-initdb.d/fabriccaserver.sql" + fi + done + + for node in $(__getOrdererAndPeerNodes); do + echo "Restoring $node..." + if [ ! -d "$node" ]; then + echo "Warning: Cannot restore '$node', directory does not exist!" + else + docker cp "./$node/" "$node:/var/hyperledger/production/" + fi + done +} + +createSnapshot() { + (set -eu && __createSnapshot "$1") +} + +cloneSnapshot() { + (set -eu && __cloneSnapshot "$1" "$2") +} +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/hooks/post-generate.sh from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +"#!/usr/bin/env bash + +# The code from this file was called after Fablo generated Hyperledger Fabric configuration +echo "Executing post-generate hook" +" +`; + +exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should create proper files from samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml 1`] = ` +[ + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/.gitignore", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/and-policy-chaincode.json", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/collections/or-policy-chaincode.json", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/configtx.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.json", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.json", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.json", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/connection-profiles/connection-profile-org2.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-orderer.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org1.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/crypto-config-org2.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/explorer/config-global.json", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/orderer.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org1.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-config/fabric-ca-server-config/org2.example.com/fabric-ca-server-config.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker.sh", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/.env", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/chaincode-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/channel-query-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/commands-generated.sh", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/docker-compose.yaml", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/base-help.sh", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/chaincode-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/channel-query-functions.sh", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/scripts/cli/channel_fns.sh", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/fabric-docker/snapshot-scripts.sh", + "e2e/__tmp__/samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.tmpdir/fablo-target/hooks/post-generate.sh", +] +`; From a595ca6b0518af23eb98383999483e7267917e55 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Fri, 9 Aug 2024 20:39:34 +0530 Subject: [PATCH 77/83] updated the fabric version in the configuration Signed-off-by: Sanket Teli --- samples/fablo-config-hlf2-1org-1chaincode.json | 2 +- src/extend-config/extendGlobal.ts | 2 +- src/types/FabloConfigExtended.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/fablo-config-hlf2-1org-1chaincode.json b/samples/fablo-config-hlf2-1org-1chaincode.json index 2aecb739..2188ecbd 100644 --- a/samples/fablo-config-hlf2-1org-1chaincode.json +++ b/samples/fablo-config-hlf2-1org-1chaincode.json @@ -1,7 +1,7 @@ { "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "tls": false }, "orgs": [ diff --git a/src/extend-config/extendGlobal.ts b/src/extend-config/extendGlobal.ts index a81e870a..ac05afde 100644 --- a/src/extend-config/extendGlobal.ts +++ b/src/extend-config/extendGlobal.ts @@ -7,7 +7,7 @@ import defaults from "./defaults"; const getNetworkCapabilities = (fabricVersion: string): Capabilities => { if (version(fabricVersion).isGreaterOrEqual("2.5.0")) - return { channel: "V2_5", orderer: "V2_5", application: "V2_5", isV2: true }; + return { channel: "V2_0", orderer: "V2_0", application: "V2_5", isV2: true }; return { channel: "V2_0", orderer: "V2_0", application: "V2_0", isV2: true }; }; diff --git a/src/types/FabloConfigExtended.ts b/src/types/FabloConfigExtended.ts index ade5af33..b3354a0e 100644 --- a/src/types/FabloConfigExtended.ts +++ b/src/types/FabloConfigExtended.ts @@ -18,8 +18,8 @@ interface CapabilitiesV2 { interface CapabilitiesV_2_5 { application: "V2_5"; - channel: "V2_5"; - orderer: "V2_5"; + channel: "V2_0"; + orderer: "V2_0"; isV2: true; } From b568f93759fe628a8ca247bb0439640a767c66b7 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Fri, 9 Aug 2024 20:51:39 +0530 Subject: [PATCH 78/83] updated snapshots Signed-off-by: Sanket Teli --- e2e/__snapshots__/extendConfig.test.ts.snap | 12 ++++++------ ...nfig-hlf2-1org-1chaincode.json.test.ts.snap | 12 ++++++------ e2e/__snapshots__/fabloCommands.test.ts.snap | 18 +++++++++--------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/e2e/__snapshots__/extendConfig.test.ts.snap b/e2e/__snapshots__/extendConfig.test.ts.snap index b9dab976..286af7a8 100644 --- a/e2e/__snapshots__/extendConfig.test.ts.snap +++ b/e2e/__snapshots__/extendConfig.test.ts.snap @@ -573,19 +573,19 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` ], "global": { "capabilities": { - "application": "V2_0", + "application": "V2_5", "channel": "V2_0", "isV2": true, "orderer": "V2_0", }, "engine": "docker", - "fabricBaseosVersion": "2.4.7", + "fabricBaseosVersion": "2.5.9", "fabricCaVersion": "1.5.5", - "fabricCcenvVersion": "2.4.7", - "fabricJavaenvVersion": "2.4", - "fabricNodeenvVersion": "2.4", + "fabricCcenvVersion": "2.5.9", + "fabricJavaenvVersion": "2.5", + "fabricNodeenvVersion": "2.5", "fabricRecommendedNodeVersion": "16", - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "monitoring": { "loglevel": "info", }, diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 24a92f05..cb5ac25d 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -16,7 +16,7 @@ Capabilities: Orderer: &OrdererCapabilities V2_0: true Application: &ApplicationCapabilities - V2_0: true + V2_5: true ################################################################################ # CHANNEL Defaults @@ -1448,13 +1448,13 @@ CHAINCODES_BASE_DIR= COMPOSE_PROJECT_NAME= LOGGING_LEVEL=info -FABRIC_VERSION=2.4.7 +FABRIC_VERSION=2.5.9 FABRIC_CA_VERSION=1.5.5 FABRIC_CA_POSTGRES_VERSION=14 -FABRIC_CCENV_VERSION=2.4.7 -FABRIC_BASEOS_VERSION=2.4.7 -FABRIC_JAVAENV_VERSION=2.4 -FABRIC_NODEENV_VERSION=2.4 +FABRIC_CCENV_VERSION=2.5.9 +FABRIC_BASEOS_VERSION=2.5.9 +FABRIC_JAVAENV_VERSION=2.5 +FABRIC_NODEENV_VERSION=2.5 RECOMMENDED_NODE_VERSION=16 ROOT_CA_ADMIN_NAME=admin diff --git a/e2e/__snapshots__/fabloCommands.test.ts.snap b/e2e/__snapshots__/fabloCommands.test.ts.snap index bfdf6f6c..1e6325b4 100644 --- a/e2e/__snapshots__/fabloCommands.test.ts.snap +++ b/e2e/__snapshots__/fabloCommands.test.ts.snap @@ -2427,15 +2427,15 @@ Validation warnings count: 0 =========================================================== { "global": { - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "tls": false, "engine": "docker", "peerDevMode": false, "fabricCaVersion": "1.5.5", - "fabricCcenvVersion": "2.4.7", - "fabricBaseosVersion": "2.4.7", - "fabricJavaenvVersion": "2.4", - "fabricNodeenvVersion": "2.4", + "fabricCcenvVersion": "2.5.9", + "fabricBaseosVersion": "2.5.9", + "fabricJavaenvVersion": "2.5", + "fabricNodeenvVersion": "2.5", "fabricRecommendedNodeVersion": "16", "paths": { "fabloConfig": "", @@ -2447,7 +2447,7 @@ Validation warnings count: 0 "capabilities": { "channel": "V2_0", "orderer": "V2_0", - "application": "V2_0", + "application": "V2_5", "isV2": true }, "tools": {} @@ -2909,7 +2909,7 @@ exports[`init should init simple fablo config 1`] = ` "{ "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "tls": false, "engine": "docker", "peerDevMode": false @@ -2963,7 +2963,7 @@ exports[`init should init simple fablo config with node chaincode 1`] = ` "{ "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "tls": false, "engine": "docker", "peerDevMode": false @@ -3025,7 +3025,7 @@ exports[`init should init simple fablo config with node chaincode and rest api 1 "{ "$schema": "https://github.com/hyperledger-labs/fablo/releases/download/1.2.1-unstable.0/schema.json", "global": { - "fabricVersion": "2.4.7", + "fabricVersion": "2.5.9", "tls": false, "engine": "docker", "peerDevMode": false From adc995e0fe39bc2cbbf37de38cbe6e626432e4b7 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Wed, 14 Aug 2024 17:25:53 +0530 Subject: [PATCH 79/83] dropped consortium according to the version Signed-off-by: Sanket Teli --- e2e/__snapshots__/extendConfig.test.ts.snap | 6 ++++++ ...rg-1chaincode-raft-explorer.json.test.ts.snap | 6 +++--- ...config-hlf2-1org-1chaincode.json.test.ts.snap | 6 +++--- ...gs-2chaincodes-private-data.yaml.test.ts.snap | 6 +++--- ...hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 16 ++++++++-------- ...gs-1chaincode-raft-explorer.json.test.ts.snap | 14 +++++++------- e2e/__snapshots__/fabloCommands.test.ts.snap | 6 ++++-- src/extend-config/extendGlobal.ts | 9 ++++++--- .../templates/fabric-config/configtx.yaml | 7 +++++++ .../fabric-docker/commands-generated.sh | 2 +- src/types/FabloConfigExtended.ts | 11 ++++++++++- 11 files changed, 58 insertions(+), 31 deletions(-) diff --git a/e2e/__snapshots__/extendConfig.test.ts.snap b/e2e/__snapshots__/extendConfig.test.ts.snap index 9d716d64..4c88a858 100644 --- a/e2e/__snapshots__/extendConfig.test.ts.snap +++ b/e2e/__snapshots__/extendConfig.test.ts.snap @@ -576,6 +576,7 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode.json 1`] = ` "application": "V2_5", "channel": "V2_0", "isV2": true, + "isV3": false, "orderer": "V2_0", }, "engine": "docker", @@ -1386,6 +1387,7 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-k8s.json 1`] = "application": "V2_0", "channel": "V2_0", "isV2": true, + "isV3": false, "orderer": "V2_0", }, "engine": "kubernetes", @@ -2171,6 +2173,7 @@ exports[`extend config samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.j "application": "V2_0", "channel": "V2_0", "isV2": true, + "isV3": false, "orderer": "V2_0", }, "engine": "docker", @@ -3521,6 +3524,7 @@ exports[`extend config samples/fablo-config-hlf2-2orgs-2chaincodes-private-data. "application": "V2_0", "channel": "V2_0", "isV2": true, + "isV3": false, "orderer": "V2_0", }, "engine": "docker", @@ -5744,6 +5748,7 @@ exports[`extend config samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml 1`] "application": "V2_0", "channel": "V2_0", "isV2": true, + "isV3": false, "orderer": "V2_0", }, "engine": "docker", @@ -8230,6 +8235,7 @@ exports[`extend config samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer. "application": "V2_0", "channel": "V2_0", "isV2": true, + "isV3": false, "orderer": "V2_0", }, "engine": "docker", diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 91103b2e..fc9155e2 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -163,7 +163,7 @@ Profiles: - *Orderer Capabilities: <<: *OrdererCapabilities - Consortiums: + Consortiums: SampleConsortium: Organizations: - *Orderer @@ -178,12 +178,12 @@ Profiles: - *Orderer Capabilities: <<: *ApplicationCapabilities - Consortium: SampleConsortium + Consortium: SampleConsortium Consortiums: SampleConsortium: Organizations: - *Org1 - Application: + Application: <<: *ApplicationDefaults Organizations: - *Org1 diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index cb5ac25d..3cf08ee5 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -159,7 +159,7 @@ Profiles: - *Orderer Capabilities: <<: *OrdererCapabilities - Consortiums: + Consortiums: SampleConsortium: Organizations: - *Orderer @@ -174,12 +174,12 @@ Profiles: - *Orderer Capabilities: <<: *ApplicationCapabilities - Consortium: SampleConsortium + Consortium: SampleConsortium Consortiums: SampleConsortium: Organizations: - *Org1 - Application: + Application: <<: *ApplicationDefaults Organizations: - *Org1 diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap index 5b4bfb00..93bf3bea 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -210,7 +210,7 @@ Profiles: - *Orderer Capabilities: <<: *OrdererCapabilities - Consortiums: + Consortiums: SampleConsortium: Organizations: - *Orderer @@ -226,13 +226,13 @@ Profiles: - *Orderer Capabilities: <<: *ApplicationCapabilities - Consortium: SampleConsortium + Consortium: SampleConsortium Consortiums: SampleConsortium: Organizations: - *Org1 - *Org2 - Application: + Application: <<: *ApplicationDefaults Organizations: - *Org1 diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index ae98f511..32eaffe5 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -256,7 +256,7 @@ Profiles: - *Orderer1 Capabilities: <<: *OrdererCapabilities - Consortiums: + Consortiums: SampleConsortium: Organizations: - *Orderer1 @@ -273,7 +273,7 @@ Profiles: - *Orderer2 Capabilities: <<: *OrdererCapabilities - Consortiums: + Consortiums: SampleConsortium: Organizations: - *Orderer1 @@ -290,13 +290,13 @@ Profiles: - *Orderer1 Capabilities: <<: *ApplicationCapabilities - Consortium: SampleConsortium + Consortium: SampleConsortium Consortiums: SampleConsortium: Organizations: - *Org1 - *Org2 - Application: + Application: <<: *ApplicationDefaults Organizations: - *Org1 @@ -311,13 +311,13 @@ Profiles: - *Orderer1 Capabilities: <<: *ApplicationCapabilities - Consortium: SampleConsortium + Consortium: SampleConsortium Consortiums: SampleConsortium: Organizations: - *Org1 - *Org2 - Application: + Application: <<: *ApplicationDefaults Organizations: - *Org1 @@ -332,13 +332,13 @@ Profiles: - *Orderer2 Capabilities: <<: *ApplicationCapabilities - Consortium: SampleConsortium + Consortium: SampleConsortium Consortiums: SampleConsortium: Organizations: - *Org1 - *Org2 - Application: + Application: <<: *ApplicationDefaults Organizations: - *Org1 diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 0c017261..638f4f25 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -263,7 +263,7 @@ Profiles: - *Org3 Capabilities: <<: *OrdererCapabilities - Consortiums: + Consortiums: SampleConsortium: Organizations: - *Orderer @@ -283,12 +283,12 @@ Profiles: - *Org3 Capabilities: <<: *ApplicationCapabilities - Consortium: SampleConsortium + Consortium: SampleConsortium Consortiums: SampleConsortium: Organizations: - *Org1 - Application: + Application: <<: *ApplicationDefaults Organizations: - *Org1 @@ -305,12 +305,12 @@ Profiles: - *Org3 Capabilities: <<: *ApplicationCapabilities - Consortium: SampleConsortium + Consortium: SampleConsortium Consortiums: SampleConsortium: Organizations: - *Org2 - Application: + Application: <<: *ApplicationDefaults Organizations: - *Org2 @@ -327,13 +327,13 @@ Profiles: - *Org3 Capabilities: <<: *ApplicationCapabilities - Consortium: SampleConsortium + Consortium: SampleConsortium Consortiums: SampleConsortium: Organizations: - *Org1 - *Org2 - Application: + Application: <<: *ApplicationDefaults Organizations: - *Org1 diff --git a/e2e/__snapshots__/fabloCommands.test.ts.snap b/e2e/__snapshots__/fabloCommands.test.ts.snap index 1e6325b4..f8acf3d6 100644 --- a/e2e/__snapshots__/fabloCommands.test.ts.snap +++ b/e2e/__snapshots__/fabloCommands.test.ts.snap @@ -26,7 +26,8 @@ Validation warnings count: 0 "channel": "V2_0", "orderer": "V2_0", "application": "V2_0", - "isV2": true + "isV2": true, + "isV3": false }, "tools": {} }, @@ -2448,7 +2449,8 @@ Validation warnings count: 0 "channel": "V2_0", "orderer": "V2_0", "application": "V2_5", - "isV2": true + "isV2": true, + "isV3": false }, "tools": {} }, diff --git a/src/extend-config/extendGlobal.ts b/src/extend-config/extendGlobal.ts index ac05afde..86fe31ff 100644 --- a/src/extend-config/extendGlobal.ts +++ b/src/extend-config/extendGlobal.ts @@ -6,10 +6,13 @@ import defaults from "./defaults"; const getNetworkCapabilities = (fabricVersion: string): Capabilities => { - if (version(fabricVersion).isGreaterOrEqual("2.5.0")) - return { channel: "V2_0", orderer: "V2_0", application: "V2_5", isV2: true }; + if (version(fabricVersion).isGreaterOrEqual("2.5.0") && !version(fabricVersion).isGreaterOrEqual("3.0.0")) + return { channel: "V2_0", orderer: "V2_0", application: "V2_5", isV2: true, isV3: false }; - return { channel: "V2_0", orderer: "V2_0", application: "V2_0", isV2: true }; + if (version(fabricVersion).isGreaterOrEqual("3.0.0")) + return { channel: "V3_0", orderer: "V2_0", application: "V2_5", isV2: false, isV3: true}; + + return { channel: "V2_0", orderer: "V2_0", application: "V2_0", isV2: true , isV3: false}; }; const getVersions = (fabricVersion: string): FabricVersions => { diff --git a/src/setup-docker/templates/fabric-config/configtx.yaml b/src/setup-docker/templates/fabric-config/configtx.yaml index f484d4a8..c05a73f3 100755 --- a/src/setup-docker/templates/fabric-config/configtx.yaml +++ b/src/setup-docker/templates/fabric-config/configtx.yaml @@ -138,12 +138,14 @@ Profiles: <%_ }) _%> Capabilities: <<: *OrdererCapabilities + <% if (!global.capabilities.isV3) { -%> Consortiums: SampleConsortium: Organizations: <%_ orgs.forEach(function(org){ _%> - *<%= org.name %> <%_ }) _%> + <% } -%> <%_ }) _%> <%_ channels.forEach(function(channel) { _%> @@ -158,11 +160,16 @@ Profiles: <%_ }) _%> Capabilities: <<: *ApplicationCapabilities + <% if (!global.capabilities.isV3) { -%> Consortium: SampleConsortium Consortiums: SampleConsortium: Organizations:<% channel.orgs.forEach(function(org){ %> - *<%= org.name %><% }) %> + <% } -%> + <% if (global.capabilities.isV3) { -%> + Consortium: SampleConsortium + <% } -%> Application: <<: *ApplicationDefaults Organizations:<% channel.orgs.forEach(function(org){ %> diff --git a/src/setup-docker/templates/fabric-docker/commands-generated.sh b/src/setup-docker/templates/fabric-docker/commands-generated.sh index 94649a53..648f046d 100644 --- a/src/setup-docker/templates/fabric-docker/commands-generated.sh +++ b/src/setup-docker/templates/fabric-docker/commands-generated.sh @@ -143,7 +143,7 @@ upgradeChaincode() { <% if (global.capabilities.isV2) { -%> <%- include('commands-generated/chaincode-install-v2.sh', { chaincode, global }); %> <% } else { -%> - <%- include('commands-generated/chaincode-upgrade-v1.4.sh', { chaincode, global }); %> + <%- include('commands-generated/chaincode-upgrade-v2.sh', { chaincode, global }); %> <% } -%> else echo "Warning! Skipping chaincode '<%= chaincode.name %>' upgrade. Chaincode directory is empty." diff --git a/src/types/FabloConfigExtended.ts b/src/types/FabloConfigExtended.ts index b3354a0e..f6b75fd2 100644 --- a/src/types/FabloConfigExtended.ts +++ b/src/types/FabloConfigExtended.ts @@ -13,6 +13,7 @@ interface CapabilitiesV2 { channel: "V2_0"; orderer: "V2_0"; isV2: true; + isV3: false; } @@ -21,11 +22,19 @@ interface CapabilitiesV_2_5 { channel: "V2_0"; orderer: "V2_0"; isV2: true; + isV3: false; } +interface CapabilitiesV3_0 { + application: "V2_5"; + channel: "V3_0"; + orderer: "V2_0"; + isV2: false; + isV3: true; +} -export type Capabilities = CapabilitiesV2 | CapabilitiesV_2_5; +export type Capabilities = CapabilitiesV2 | CapabilitiesV_2_5 | CapabilitiesV3_0; export interface Global extends FabricVersions { tls: boolean; From 105eec784fd0cecdabc24d1115255b6a4d32d2f5 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Wed, 14 Aug 2024 19:16:34 +0530 Subject: [PATCH 80/83] fixed the indentation errors Signed-off-by: Sanket Teli --- .../templates/fabric-config/configtx.yaml | 93 ++++++++++--------- 1 file changed, 50 insertions(+), 43 deletions(-) diff --git a/src/setup-docker/templates/fabric-config/configtx.yaml b/src/setup-docker/templates/fabric-config/configtx.yaml index c05a73f3..816a8633 100755 --- a/src/setup-docker/templates/fabric-config/configtx.yaml +++ b/src/setup-docker/templates/fabric-config/configtx.yaml @@ -126,53 +126,60 @@ Orderer: &<%= ordererGroup.configtxOrdererDefaults %> # https://github:com/hyperledger/fabric/blob/master/sampleconfig/configtx.yaml Profiles: -<%_ ordererGroups.forEach(function(ordererGroup) { _%> + <%_ ordererGroups.forEach(function(ordererGroup) { _%> # Profile used to create Genesis block for group <%= ordererGroup.name %> # <%= ordererGroup.profileName %>: - <<: *ChannelDefaults - Orderer: - <<: *<%= ordererGroup.configtxOrdererDefaults %> - Organizations: - <%_ ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> - - *<%= hostingOrg %> + <<: *ChannelDefaults + Orderer: + <<: *<%= ordererGroup.configtxOrdererDefaults %> + Organizations: + <%_ ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> + - *<%= hostingOrg %> + <%_ }) _%> + Capabilities: + <<: *OrdererCapabilities + + <%_ if (!global.capabilities.isV3) { _%> + Consortiums: + SampleConsortium: + Organizations: + <%_ orgs.forEach(function(org){ _%> + - *<%= org.name %> <%_ }) _%> - Capabilities: - <<: *OrdererCapabilities - <% if (!global.capabilities.isV3) { -%> - Consortiums: - SampleConsortium: - Organizations: - <%_ orgs.forEach(function(org){ _%> - - *<%= org.name %> - <%_ }) _%> - <% } -%> + <%_ } _%> + <%_ }) _%> -<%_ }) _%> -<%_ channels.forEach(function(channel) { _%> + <%_ channels.forEach(function(channel) { _%> # Profile used to create channeltx for <%= channel.name %> # <%= channel.profileName %>: - <<: *ChannelDefaults - Orderer: - <<: *<%= channel.ordererGroup.configtxOrdererDefaults %> - Organizations: - <%_ channel.ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> - - *<%= hostingOrg %> + <<: *ChannelDefaults + Orderer: + <<: *<%= channel.ordererGroup.configtxOrdererDefaults %> + Organizations: + <%_ channel.ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> + - *<%= hostingOrg %> + <%_ }) _%> + Capabilities: + <<: *ApplicationCapabilities + + <%_ if (!global.capabilities.isV3) { _%> + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + <%_ channel.orgs.forEach(function(org){ _%> + - *<%= org.name %> <%_ }) _%> - Capabilities: - <<: *ApplicationCapabilities - <% if (!global.capabilities.isV3) { -%> - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations:<% channel.orgs.forEach(function(org){ %> - - *<%= org.name %><% }) %> - <% } -%> - <% if (global.capabilities.isV3) { -%> - Consortium: SampleConsortium - <% } -%> - Application: - <<: *ApplicationDefaults - Organizations:<% channel.orgs.forEach(function(org){ %> - - *<%= org.name %><% }) %> - -<%_ }) _%> + <%_ } _%> + + <%_ if (global.capabilities.isV3) { _%> + Consortium: SampleConsortium + <%_ } _%> + + Application: + <<: *ApplicationDefaults + Organizations: + <%_ channel.orgs.forEach(function(org){ _%> + - *<%= org.name %> + <%_ }) _%> + <%_ }) _%> From 677a98d409686f89f2fa3d0892421e047de19084 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Wed, 14 Aug 2024 19:29:10 +0530 Subject: [PATCH 81/83] updated the snapshots Signed-off-by: Sanket Teli --- ...1chaincode-raft-explorer.json.test.ts.snap | 59 +++--- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 59 +++--- ...2chaincodes-private-data.yaml.test.ts.snap | 65 +++---- ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 175 +++++++++--------- ...1chaincode-raft-explorer.json.test.ts.snap | 161 ++++++++-------- 5 files changed, 269 insertions(+), 250 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index fc9155e2..886248b4 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -156,37 +156,40 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index 3cf08ee5..ae0094f3 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -152,37 +152,40 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap index 93bf3bea..faff020e 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -203,40 +203,43 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index 32eaffe5..c9e6e800 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -249,100 +249,105 @@ Orderer: &Group2Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer1 - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer1 - - *Orderer2 - - *Org1 - - *Org2 - + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer1 + Capabilities: + <<: *OrdererCapabilities + + Consortiums: + SampleConsortium: + Organizations: + - *Orderer1 + - *Orderer2 + - *Org1 + - *Org2 # Profile used to create Genesis block for group group2 # Group2Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group2Defaults - Organizations: - - *Orderer2 - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer1 - - *Orderer2 - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group2Defaults + Organizations: + - *Orderer2 + Capabilities: + <<: *OrdererCapabilities + + Consortiums: + SampleConsortium: + Organizations: + - *Orderer1 + - *Orderer2 + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer1 - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 - + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer1 + Capabilities: + <<: *ApplicationCapabilities + + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel2 # MyChannel2: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer1 - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 - + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer1 + Capabilities: + <<: *ApplicationCapabilities + + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel3 # MyChannel3: - <<: *ChannelDefaults - Orderer: - <<: *Group2Defaults - Organizations: - - *Orderer2 - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group2Defaults + Organizations: + - *Orderer2 + Capabilities: + <<: *ApplicationCapabilities + + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 638f4f25..019302db 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -253,91 +253,96 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *OrdererCapabilities - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *OrdererCapabilities + + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *ApplicationCapabilities + + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 # Profile used to create channeltx for my-channel2 # MyChannel2: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org2 - + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *ApplicationCapabilities + + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org2 + + Application: + <<: *ApplicationDefaults + Organizations: + - *Org2 # Profile used to create channeltx for my-channel3 # MyChannel3: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *ApplicationCapabilities - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *ApplicationCapabilities + + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 " `; From 3d2220796278024f8c4c4b05e2eb9de6fd055a30 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Wed, 14 Aug 2024 20:27:00 +0530 Subject: [PATCH 82/83] fixed the indentation and linting error Signed-off-by: Sanket Teli --- ...1chaincode-raft-explorer.json.test.ts.snap | 59 +++--- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 59 +++--- ...2chaincodes-private-data.yaml.test.ts.snap | 65 ++++--- ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 172 +++++++++--------- ...1chaincode-raft-explorer.json.test.ts.snap | 159 ++++++++-------- .../templates/fabric-config/configtx.yaml | 87 ++++----- 6 files changed, 284 insertions(+), 317 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 886248b4..91103b2e 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -156,40 +156,37 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index ae0094f3..cb5ac25d 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -152,40 +152,37 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap index faff020e..5b4bfb00 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -203,43 +203,40 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index c9e6e800..5cb507bf 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -249,105 +249,97 @@ Orderer: &Group2Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer1 - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer1 - - *Orderer2 - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer1 + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer1 + - *Orderer2 + - *Org1 + - *Org2 # Profile used to create Genesis block for group group2 # Group2Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group2Defaults - Organizations: - - *Orderer2 - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer1 - - *Orderer2 - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group2Defaults + Organizations: + - *Orderer2 + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer1 + - *Orderer2 + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer1 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer1 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel2 # MyChannel2: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer1 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer1 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel3 # MyChannel3: - <<: *ChannelDefaults - Orderer: - <<: *Group2Defaults - Organizations: - - *Orderer2 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group2Defaults + Organizations: + - *Orderer2 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 019302db..2bcb9006 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -253,96 +253,89 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 # Profile used to create channeltx for my-channel2 # MyChannel2: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org2 # Profile used to create channeltx for my-channel3 # MyChannel3: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 " `; diff --git a/src/setup-docker/templates/fabric-config/configtx.yaml b/src/setup-docker/templates/fabric-config/configtx.yaml index 816a8633..c3f81a43 100755 --- a/src/setup-docker/templates/fabric-config/configtx.yaml +++ b/src/setup-docker/templates/fabric-config/configtx.yaml @@ -129,57 +129,48 @@ Profiles: <%_ ordererGroups.forEach(function(ordererGroup) { _%> # Profile used to create Genesis block for group <%= ordererGroup.name %> # <%= ordererGroup.profileName %>: - <<: *ChannelDefaults - Orderer: - <<: *<%= ordererGroup.configtxOrdererDefaults %> - Organizations: - <%_ ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> - - *<%= hostingOrg %> - <%_ }) _%> - Capabilities: - <<: *OrdererCapabilities - - <%_ if (!global.capabilities.isV3) { _%> - Consortiums: - SampleConsortium: - Organizations: - <%_ orgs.forEach(function(org){ _%> - - *<%= org.name %> - <%_ }) _%> - <%_ } _%> + <<: *ChannelDefaults + Orderer: + <<: *<%= ordererGroup.configtxOrdererDefaults %> + Organizations: + <%_ ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> + - *<%= hostingOrg %> + <%_ }) _%> + Capabilities: + <<: *OrdererCapabilities + <%_ if (!global.capabilities.isV3) { _%> + Consortiums: + SampleConsortium: + Organizations: + <%_ orgs.forEach(function(org){ _%> + - *<%= org.name %> + <%_ }) _%> + <%_ } _%> <%_ }) _%> <%_ channels.forEach(function(channel) { _%> # Profile used to create channeltx for <%= channel.name %> # <%= channel.profileName %>: - <<: *ChannelDefaults - Orderer: - <<: *<%= channel.ordererGroup.configtxOrdererDefaults %> - Organizations: - <%_ channel.ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> - - *<%= hostingOrg %> - <%_ }) _%> - Capabilities: - <<: *ApplicationCapabilities - - <%_ if (!global.capabilities.isV3) { _%> - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - <%_ channel.orgs.forEach(function(org){ _%> - - *<%= org.name %> - <%_ }) _%> - <%_ } _%> - - <%_ if (global.capabilities.isV3) { _%> - Consortium: SampleConsortium - <%_ } _%> - - Application: - <<: *ApplicationDefaults - Organizations: - <%_ channel.orgs.forEach(function(org){ _%> - - *<%= org.name %> - <%_ }) _%> + <<: *ChannelDefaults + Orderer: + <<: *<%= channel.ordererGroup.configtxOrdererDefaults %> + Organizations: + <%_ channel.ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> + - *<%= hostingOrg %> + <%_ }) _%> + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + <%_ channel.orgs.forEach(function(org){ _%> + - *<%= org.name %> + <%_ }) _%> + Application: + <<: *ApplicationDefaults + Organizations: + <%_ channel.orgs.forEach(function(org){ _%> + - *<%= org.name %> + <%_ }) _%> <%_ }) _%> From 43e77e64ba4e047654f44757c5e762128e77b0ed Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Tue, 3 Sep 2024 23:01:22 +0530 Subject: [PATCH 83/83] improved the .gitignore file from the debugging perspective Signed-off-by: Sanket Teli --- .gitignore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 333833db..ef408c5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ e2e/__tmp__ -e2e-network/*.logs -e2e-network/*.tmpdir +e2e-network/docker/*.logs +e2e-network/docker/*.tmpdir fablo-target generators node_modules