diff --git a/.github/workflows/.dast-nuclei-cmd-api-server.yaml b/.github/workflows/.dast-nuclei-cmd-api-server.yaml index cc33771fff3..6f1f0d3ff6e 100644 --- a/.github/workflows/.dast-nuclei-cmd-api-server.yaml +++ b/.github/workflows/.dast-nuclei-cmd-api-server.yaml @@ -1,5 +1,8 @@ name: DAST_Scan_Nuclei +env: + NODEJS_VERSION: v18.18.2 + on: push: branches: [main, dev] @@ -23,10 +26,10 @@ jobs: indy-cli \ && sudo rm -f /etc/apt/sources.list.d/sovrin.list* - - name: Set up NodeJS v16.9.1 + - name: Set up NodeJS ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.9.1 + node-version: ${{ env.NODEJS_VERSION }} - name: Install jq run: sudo apt update && sudo apt install -y jq diff --git a/.github/workflows/all-nodejs-packages-publish.yaml b/.github/workflows/all-nodejs-packages-publish.yaml index 291242928a4..3624acf3d92 100644 --- a/.github/workflows/all-nodejs-packages-publish.yaml +++ b/.github/workflows/all-nodejs-packages-publish.yaml @@ -1,5 +1,8 @@ name: all-nodejs-packages-publish +env: + NODEJS_VERSION: v18.18.2 + on: push: @@ -21,7 +24,7 @@ jobs: - uses: actions/setup-node@v3.6.0 with: always-auth: true - node-version: '16.14.2' + node-version: ${{ env.NODEJS_VERSION }} registry-url: 'https://registry.npmjs.org' - name: ./tools/ci.sh run: ./tools/ci.sh diff --git a/.github/workflows/cacti-dev-container-vscode-publish.yaml b/.github/workflows/cacti-dev-container-vscode-publish.yaml index 64ce3932759..521f520e2bd 100644 --- a/.github/workflows/cacti-dev-container-vscode-publish.yaml +++ b/.github/workflows/cacti-dev-container-vscode-publish.yaml @@ -1,5 +1,8 @@ name: connector-fabric-publish +env: + NODEJS_VERSION: v20.3.0 + on: push: # Publish `v1.2.3` tags as releases. @@ -27,10 +30,10 @@ jobs: contents: read steps: - - name: Use Node.js v20.3.0 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v20.3.0 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 908ddcba9f0..221428f3e6a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,6 @@ --- +env: + NODEJS_VERSION: v18.18.2 jobs: ActionLint: uses: ./.github/workflows/actionlint.yaml @@ -26,10 +28,10 @@ jobs: CHECK_WORK_TREE_STATUS_DISABLED: true runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -57,10 +59,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache name: Restore Yarn Cache @@ -85,10 +87,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -156,10 +158,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache name: Restore Yarn Cache @@ -183,10 +185,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache name: Restore Yarn Cache @@ -209,10 +211,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -238,10 +240,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -264,10 +266,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -293,10 +295,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -319,10 +321,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -344,10 +346,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -370,10 +372,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -395,10 +397,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -421,10 +423,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -447,10 +449,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -472,10 +474,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -498,10 +500,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -523,10 +525,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -550,10 +552,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -575,10 +577,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -600,10 +602,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -626,10 +628,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -652,10 +654,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -678,10 +680,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -703,10 +705,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -729,10 +731,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -755,10 +757,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -782,10 +784,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -809,10 +811,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -839,10 +841,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -868,10 +870,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -898,10 +900,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -928,10 +930,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -958,10 +960,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -988,10 +990,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1018,10 +1020,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1048,10 +1050,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1078,10 +1080,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1108,10 +1110,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1138,10 +1140,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1168,10 +1170,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1198,10 +1200,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1226,10 +1228,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1253,10 +1255,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1278,10 +1280,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1303,10 +1305,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache name: Restore Yarn Cache @@ -1329,10 +1331,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1354,10 +1356,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache name: Restore Yarn Cache @@ -1380,10 +1382,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1405,10 +1407,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1431,10 +1433,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1456,10 +1458,10 @@ jobs: # needs: build-dev # runs-on: ubuntu-20.04 # steps: - # - name: Use Node.js v16.14.2 + # - name: Use Node.js ${{ env.NODEJS_VERSION }} # uses: actions/setup-node@v3.6.0 # with: - # node-version: v16.14.2 + # node-version: ${{ env.NODEJS_VERSION }} # - uses: actions/checkout@v3.5.2 # - id: yarn-cache-dir-path # name: Get yarn cache directory path @@ -1484,10 +1486,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1511,10 +1513,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1537,10 +1539,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1563,10 +1565,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1589,10 +1591,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1623,10 +1625,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1650,10 +1652,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1675,10 +1677,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1700,10 +1702,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache-dir-path name: Get yarn cache directory path @@ -1729,10 +1731,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1754,10 +1756,10 @@ jobs: needs: build-dev runs-on: ubuntu-20.04 steps: - - name: Use Node.js v16.14.2 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.14.2 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - id: yarn-cache @@ -1885,10 +1887,10 @@ jobs: env: IMAGE_NAME: cacti-dev-container-vscode steps: - - name: Use Node.js v20.3.0 + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v20.3.0 + node-version: ${{ env.NODEJS_VERSION }} - uses: actions/checkout@v3.5.2 - name: npm_install_@devcontainers/cli@0.44.0 run: npm install -g @devcontainers/cli@0.44.0 diff --git a/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml b/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml index 57edef0ae50..bc89547012d 100644 --- a/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml +++ b/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml @@ -1,5 +1,8 @@ name: ghpkg-all-kotlin-api-clients-publish +env: + NODEJS_VERSION: v18.18.2 + on: push: branches: [main, dev] @@ -42,10 +45,10 @@ jobs: distribution: 'adopt' java-version: '8' - - name: Set up NodeJS v16.9.1 + - name: Set up NodeJS ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: v16.9.1 + node-version: ${{ env.NODEJS_VERSION }} - run: npm run configure diff --git a/.github/workflows/publish-npm.yaml b/.github/workflows/publish-npm.yaml index 6ecb9185779..68f9d046ca5 100644 --- a/.github/workflows/publish-npm.yaml +++ b/.github/workflows/publish-npm.yaml @@ -1,5 +1,8 @@ name: publish-npm-manually +env: + NODEJS_VERSION: v18.18.2 + on: workflow_dispatch: inputs: @@ -24,7 +27,7 @@ jobs: - uses: actions/setup-node@v3.6.0 with: always-auth: true - node-version: '16.14.2' + node-version: ${{ env.NODEJS_VERSION }} registry-url: 'https://registry.npmjs.org' - name: ./tools/ci.sh run: ./tools/ci.sh diff --git a/.github/workflows/test_weaver-asset-exchange-besu.yaml b/.github/workflows/test_weaver-asset-exchange-besu.yaml index 1bc5737355f..9e8a8b704b3 100644 --- a/.github/workflows/test_weaver-asset-exchange-besu.yaml +++ b/.github/workflows/test_weaver-asset-exchange-besu.yaml @@ -2,6 +2,9 @@ name: Test Asset Exchange Besu +env: + NODEJS_VERSION: v18.18.2 + # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the main branch @@ -19,12 +22,12 @@ concurrency: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - + asset-exchange-besu: if: ${{ false }} # The type of runner that the job will run on runs-on: ubuntu-latest - + strategy: fail-fast: false matrix: @@ -34,36 +37,36 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Set up JDK 11 uses: actions/setup-java@v3.11.0 with: java-version: '11' distribution: 'adopt' - - name: Use Node.js 14.x + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x + node-version: ${{ env.NODEJS_VERSION }} - name: Use Protoc 3.15 run: | curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc - + # PROTOS - name: Build Solidity Protos run: | export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" make build working-directory: weaver/common/protos-sol - + # BESU NETWORK - name: Start Besu Network run: | sudo apt install -y tmux jq - wget https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/22.7.0/besu-22.7.0.zip - unzip besu-22.7.0.zip + wget https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/22.7.0/besu-22.7.0.zip + unzip besu-22.7.0.zip export PATH="${PWD}/besu-22.7.0/bin:$PATH" wget https://artifacts.consensys.net/public/ethsigner/raw/names/ethsigner.zip/versions/22.1.3/ethsigner-22.1.3.zip unzip ethsigner-22.1.3.zip @@ -71,7 +74,7 @@ jobs: make start sleep 100 working-directory: weaver/tests/network-setups/besu - + # Deploy contracts - name: Deploy contracts run: | @@ -96,18 +99,18 @@ jobs: jq -r '.network2.tokenContract |= "../simpleasset/build/contracts/BobERC20.json"' tmp.json > config.json rm tmp.json working-directory: weaver/samples/besu/besu-cli - + - name: Asset Exchange Besu CLI Tests run: | export PATH="${PWD}/bin:$PATH" COUNT=0 TOTAL=10 - + # HTLC Params timeout=1000 hashBase64="ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs=" preimage="secrettext" - + # issue tokens to account 1 initAmount=10 transferAmount=5 @@ -117,7 +120,7 @@ jobs: besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --asset_type=ERC20 besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out elif [ ${{ matrix.app_contract }} == "AliceERC1155" ]; then - besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --token_id=${tokenId} --token_data="" --asset_type=ERC1155 + besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --token_id=${tokenId} --token_data="" --asset_type=ERC1155 besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --token_id=${tokenId} --timeout=${timeout} --asset_type=ERC1155 --hash_base64=${hashBase64} 1> tmp.out else initAmount=1 @@ -128,7 +131,7 @@ jobs: echo $tokenId besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --token_id=${tokenId} --asset_type=ERC721 --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out fi - + balanceRem=$((initAmount-transferAmount)) cat tmp.out | grep "Account balance of the sender in Network network1: ${initAmount} " && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out | grep "Account balance of the sender in Network network1: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" @@ -143,7 +146,7 @@ jobs: besu-cli asset is-locked --network=network1 --lock_contract_id=$LOCK_ID 1> tmp.out cat tmp.out | grep "in Network network1: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # Claim asset besu-cli asset claim --network=network1 --recipient_account=2 --preimage=${preimage} --token_id=${tokenId} --lock_contract_id=$LOCK_ID 1> tmp.out cat tmp.out | grep "Account balance of the recipient in Network network1 before claiming: 0" && COUNT=$(( COUNT + 1 )) && echo "PASS" @@ -172,7 +175,7 @@ jobs: echo $tokenId besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --token_id=${tokenId} --asset_type=ERC721 --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out fi - + balanceRem=$((initAmount-transferAmount)) cat tmp.out | grep "Account balance of the sender in Network network1: ${initAmount}" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out | grep "Account balance of the sender in Network network1: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" @@ -182,14 +185,14 @@ jobs: tmp_string=$(cat tmp.out | grep "Lock contract ID:") arrIN=(${tmp_string//:/ }) LOCK_ID=${arrIN[3]} - + sleep $timeout besu-cli asset unlock --network=network1 --lock_contract_id=$LOCK_ID --sender_account=1 --token_id=${tokenId} 1> tmp.out cat tmp.out | grep "before unlocking: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out | grep "after unlocking: ${initAmount}" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # RESULT echo "Passed $COUNT/$TOTAL Tests." @@ -199,11 +202,11 @@ jobs: exit 1 fi working-directory: weaver/samples/besu/besu-cli - + asset-exchange-besu-local: # The type of runner that the job will run on runs-on: ubuntu-latest - + strategy: fail-fast: false matrix: @@ -213,30 +216,30 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Set up JDK 11 uses: actions/setup-java@v3.11.0 with: java-version: '11' distribution: 'adopt' - - name: Use Node.js 14.x + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x + node-version: ${{ env.NODEJS_VERSION }} - name: Use Protoc 3.15 run: | curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc - + # PROTOS - name: Build JS Protos run: | export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" make build working-directory: weaver/common/protos-js - + # PROTOS - name: Build Solidity Protos run: | @@ -247,14 +250,14 @@ jobs: # BESU SDK - name: Setup BESU SDK run: make build-local - working-directory: weaver/sdks/besu/node - + working-directory: weaver/sdks/besu/node + # BESU NETWORK - name: Start Besu Network run: | sudo apt install -y tmux jq - wget https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/22.7.0/besu-22.7.0.zip - unzip besu-22.7.0.zip + wget https://hyperledger.jfrog.io/artifactory/besu-binaries/besu/22.7.0/besu-22.7.0.zip + unzip besu-22.7.0.zip export PATH="${PWD}/besu-22.7.0/bin:$PATH" wget https://artifacts.consensys.net/public/ethsigner/raw/names/ethsigner.zip/versions/22.1.3/ethsigner-22.1.3.zip unzip ethsigner-22.1.3.zip @@ -262,7 +265,7 @@ jobs: make start sleep 100 working-directory: weaver/tests/network-setups/besu - + # Deploy contracts - name: Deploy contracts run: | @@ -279,19 +282,19 @@ jobs: cp config.json tmp.json jq -r '.network2.tokenContract |= "../simpleasset/build/contracts/BobERC20.json"' tmp.json > config.json rm tmp.json - working-directory: weaver/samples/besu/besu-cli - + working-directory: weaver/samples/besu/besu-cli + - name: Asset Exchange Besu CLI Tests run: | export PATH="${PWD}/bin:$PATH" COUNT=0 TOTAL=10 - + # HTLC Params timeout=1000 hashBase64="ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs=" preimage="secrettext" - + # issue tokens to account 1 initAmount=10 transferAmount=5 @@ -301,7 +304,7 @@ jobs: besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --asset_type=ERC20 besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out elif [ ${{ matrix.app_contract }} == "AliceERC1155" ]; then - besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --token_id=${tokenId} --token_data="" --asset_type=ERC1155 + besu-cli asset issue --network=network1 --account=1 --amount=${initAmount} --token_id=${tokenId} --token_data="" --asset_type=ERC1155 besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --amount=${transferAmount} --token_id=${tokenId} --timeout=${timeout} --asset_type=ERC1155 --hash_base64=${hashBase64} 1> tmp.out else initAmount=1 @@ -312,7 +315,7 @@ jobs: echo $tokenId besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --token_id=${tokenId} --asset_type=ERC721 --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out fi - + balanceRem=$((initAmount-transferAmount)) cat tmp.out | grep "Account balance of the sender in Network network1: ${initAmount} " && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out | grep "Account balance of the sender in Network network1: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" @@ -327,7 +330,7 @@ jobs: besu-cli asset is-locked --network=network1 --lock_contract_id=$LOCK_ID 1> tmp.out cat tmp.out | grep "in Network network1: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # Claim asset besu-cli asset claim --network=network1 --recipient_account=2 --preimage=${preimage} --token_id=${tokenId} --lock_contract_id=$LOCK_ID 1> tmp.out cat tmp.out | grep "Account balance of the recipient in Network network1 before claiming: 0" && COUNT=$(( COUNT + 1 )) && echo "PASS" @@ -356,7 +359,7 @@ jobs: echo $tokenId besu-cli asset lock --network=network1 --sender_account=1 --recipient_account=2 --token_id=${tokenId} --asset_type=ERC721 --timeout=${timeout} --hash_base64=${hashBase64} 1> tmp.out fi - + balanceRem=$((initAmount-transferAmount)) cat tmp.out | grep "Account balance of the sender in Network network1: ${initAmount}" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out | grep "Account balance of the sender in Network network1: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" @@ -366,14 +369,14 @@ jobs: tmp_string=$(cat tmp.out | grep "Lock contract ID:") arrIN=(${tmp_string//:/ }) LOCK_ID=${arrIN[3]} - + sleep $timeout besu-cli asset unlock --network=network1 --lock_contract_id=$LOCK_ID --sender_account=1 --token_id=${tokenId} 1> tmp.out cat tmp.out | grep "before unlocking: ${balanceRem}" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out | grep "after unlocking: ${initAmount}" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # RESULT echo "Passed $COUNT/$TOTAL Tests." diff --git a/.github/workflows/test_weaver-asset-exchange-corda.yaml b/.github/workflows/test_weaver-asset-exchange-corda.yaml index d7c083c860b..937359ef956 100644 --- a/.github/workflows/test_weaver-asset-exchange-corda.yaml +++ b/.github/workflows/test_weaver-asset-exchange-corda.yaml @@ -23,7 +23,7 @@ concurrency: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - + asset-exchange-corda: if: ${{ false }} # The type of runner that the job will run on @@ -33,13 +33,13 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Set up JDK 8 uses: actions/setup-java@v3.11.0 with: java-version: '8' distribution: 'adopt' - + # CORDA NETWORK - name: Generate github.properties run: | @@ -47,17 +47,17 @@ jobs: echo "username=${GITHUB_ACTOR}" >> github.properties echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties echo "url=https://maven.pkg.github.com/${GITHUB_ACTOR}/cacti" >> github.properties - + echo "Using ${GITHUB_ACTOR} user." echo "username=${GITHUB_ACTOR}" >> github.main.properties echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.main.properties echo "url=https://maven.pkg.github.com/hyperledger/cacti" >> github.main.properties - + ./scripts/get-cordapps.sh || mv github.main.properties github.properties - + cat github.properties working-directory: weaver/tests/network-setups/corda - + # CORDA NETWORK - name: Start Corda Network run: | @@ -66,12 +66,12 @@ jobs: docker logs corda_partya_1 docker logs corda_partyb_1 working-directory: weaver/tests/network-setups/corda - + # FABRIC CLI - name: Setup Corda CLI init run: ./scripts/initAsset.sh 1 working-directory: weaver/samples/corda/corda-simple-application - + - name: Asset Exchange Corda CLI Tests run: | COUNT=0 @@ -81,30 +81,30 @@ jobs: CORDA_PORT=10009 ./clients/build/install/clients/bin/clients lock-asset -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 180 -r "O=PartyA,L=London,C=GB" -p t1:50 1> tmp.out cat tmp.out | grep "HTLC Lock State created with contract ID Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') - + # Is Asset locked CORDA_PORT=10009 ./clients/build/install/clients/bin/clients is-asset-locked -cid $CID 1> tmp.out cat tmp.out | grep "Is Asset Locked Response: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # Claim asset CORDA_PORT=10006 ./clients/build/install/clients/bin/clients claim-asset -cid $CID -s secrettext 1> tmp.out cat tmp.out | grep "Asset Claim Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # Timeout CORDA_PORT=10006 ./clients/build/install/clients/bin/clients lock-asset -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 5 -r "O=PartyB,L=London,C=GB" -p t1:50 1> tmp.out CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') sleep 5 cat tmp.out - + ## Is asset lock false CORDA_PORT=10009 ./clients/build/install/clients/bin/clients is-asset-locked -cid $CID 1> tmp.out cat tmp.out | grep "Is Asset Locked Response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + ## Unlock asset CORDA_PORT=10006 ./clients/build/install/clients/bin/clients unlock-asset -cid $CID 1> tmp.out cat tmp.out | grep "Asset Unlock Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" @@ -119,7 +119,7 @@ jobs: exit 1 fi working-directory: weaver/samples/corda/corda-simple-application - + asset-exchange-corda-local: # The type of runner that the job will run on runs-on: ubuntu-latest @@ -128,30 +128,30 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Set up JDK 8 uses: actions/setup-java@v3.11.0 with: java-version: '8' distribution: 'adopt' - + - name: Build Java Protos run: make build working-directory: weaver/common/protos-java-kt - - # Build Dependencies + + # Build Dependencies - name: Build Corda Interop App run: make build-local working-directory: weaver/core/network/corda-interop-app - + - name: Build Corda Interop SDK run: make build working-directory: weaver/sdks/corda - + - name: Build Corda SimpleApplication run: make build-local working-directory: weaver/samples/corda/corda-simple-application - + # CORDA NETWORK - name: Start Corda Network run: | @@ -160,12 +160,12 @@ jobs: docker logs corda_partya_1 docker logs corda_partyb_1 working-directory: weaver/tests/network-setups/corda - + # FABRIC CLI - name: Setup Corda CLI init run: ./scripts/initAsset.sh 1 working-directory: weaver/samples/corda/corda-simple-application - + - name: Asset Exchange Corda CLI Tests run: | COUNT=0 @@ -175,30 +175,30 @@ jobs: CORDA_PORT=10009 ./clients/build/install/clients/bin/clients lock-asset -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 180 -r "O=PartyA,L=London,C=GB" -p t1:50 1> tmp.out cat tmp.out | grep "HTLC Lock State created with contract ID Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') - + # Is Asset locked CORDA_PORT=10009 ./clients/build/install/clients/bin/clients is-asset-locked -cid $CID 1> tmp.out cat tmp.out | grep "Is Asset Locked Response: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # Claim asset CORDA_PORT=10006 ./clients/build/install/clients/bin/clients claim-asset -cid $CID -s secrettext 1> tmp.out cat tmp.out | grep "Asset Claim Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # Timeout CORDA_PORT=10006 ./clients/build/install/clients/bin/clients lock-asset -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 5 -r "O=PartyB,L=London,C=GB" -p t1:50 1> tmp.out CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') sleep 5 cat tmp.out - + ## Is asset lock false CORDA_PORT=10009 ./clients/build/install/clients/bin/clients is-asset-locked -cid $CID 1> tmp.out cat tmp.out | grep "Is Asset Locked Response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + ## Unlock asset CORDA_PORT=10006 ./clients/build/install/clients/bin/clients unlock-asset -cid $CID 1> tmp.out cat tmp.out | grep "Asset Unlock Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" @@ -213,7 +213,7 @@ jobs: exit 1 fi working-directory: weaver/samples/corda/corda-simple-application - + house-token-exchange-corda: if: ${{ false }} # The type of runner that the job will run on @@ -223,13 +223,13 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Set up JDK 8 uses: actions/setup-java@v3.11.0 with: java-version: '8' distribution: 'adopt' - + # CORDA NETWORK - name: Generate github.properties run: | @@ -237,17 +237,17 @@ jobs: echo "username=${GITHUB_ACTOR}" >> github.properties echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties echo "url=https://maven.pkg.github.com/${GITHUB_ACTOR}/cacti" >> github.properties - + echo "Using ${GITHUB_ACTOR} user." echo "username=${GITHUB_ACTOR}" >> github.main.properties echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.main.properties echo "url=https://maven.pkg.github.com/hyperledger/cacti" >> github.main.properties - + ./scripts/get-cordapps.sh || mv github.main.properties github.properties - + cat github.properties working-directory: weaver/tests/network-setups/corda - + # CORDA NETWORK - name: Start Corda Network run: | @@ -257,18 +257,18 @@ jobs: docker logs corda_partyb_1 docker logs corda_partyc_1 working-directory: weaver/tests/network-setups/corda - + # CORDA CLI - name: Build CLI run: | cp ../../../tests/network-setups/corda/github.properties . make build-cli working-directory: weaver/samples/corda/corda-simple-application - + - name: Setup Corda CLI init run: ./scripts/initHouseToken.sh 1 working-directory: weaver/samples/corda/corda-simple-application - + - name: House Token Exchange Corda CLI Tests run: | COUNT=0 @@ -278,30 +278,30 @@ jobs: CORDA_PORT=10009 ./clients/build/install/clients/bin/clients house-token lock -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 180 -r "O=PartyA,L=London,C=GB" -o "O=PartyC,L=London,C=GB" -p house:10 1> tmp.out cat tmp.out | grep "HTLC Lock State created with contract ID Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') - + # Is Asset locked CORDA_PORT=10009 ./clients/build/install/clients/bin/clients house-token is-locked -cid $CID 1> tmp.out cat tmp.out | grep "Is Asset Locked Response: true" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # Claim asset CORDA_PORT=10006 ./clients/build/install/clients/bin/clients house-token claim -cid $CID -s secrettext 1> tmp.out cat tmp.out | grep "Asset Claim Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # Timeout CORDA_PORT=10006 ./clients/build/install/clients/bin/clients house-token lock -f -h64 ivHErp1x4bJDKuRo6L5bApO/DdoyD/dG0mAZrzLZEIs= -t 10 -r "O=PartyB,L=London,C=GB" -p house:20 1> tmp.out CID=$(cat tmp.out | grep "HTLC Lock State created with contract ID Right" | sed -e 's/.*Right(b=\(.*\))\./\1/') sleep 10 cat tmp.out - + ## Is asset lock false CORDA_PORT=10009 ./clients/build/install/clients/bin/clients house-token is-locked -cid $CID 1> tmp.out cat tmp.out | grep "Is Asset Locked Response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + ## Unlock asset CORDA_PORT=10006 ./clients/build/install/clients/bin/clients house-token unlock -cid $CID 1> tmp.out cat tmp.out | grep "Asset Unlock Response: Right" && COUNT=$(( COUNT + 1 )) && echo "PASS" diff --git a/.github/workflows/test_weaver-asset-exchange-fabric.yaml b/.github/workflows/test_weaver-asset-exchange-fabric.yaml index f476251820b..05647805949 100644 --- a/.github/workflows/test_weaver-asset-exchange-fabric.yaml +++ b/.github/workflows/test_weaver-asset-exchange-fabric.yaml @@ -6,6 +6,9 @@ name: Test Asset Exchange Fabric +env: + NODEJS_VERSION: v18.18.2 + # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the main branch @@ -33,22 +36,22 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Set up Go uses: actions/setup-go@v4.0.0 with: go-version: '1.20.2' - - - name: Use Node.js 14.x + + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x - + node-version: ${{ env.NODEJS_VERSION }} + # FABRIC NETWORK - name: Start Fabric Network run: make start-interop CHAINCODE_NAME=simpleasset PROFILE="2-nodes" working-directory: weaver/tests/network-setups/fabric/dev - + # FABRIC CLI - name: Setup Fabric CLI .npmrc run: | @@ -73,11 +76,11 @@ jobs: ./bin/fabric-cli env set CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/config.json cat .env working-directory: weaver/samples/fabric/fabric-cli - + - name: Fabric CLI Init run: ./scripts/initAsset.sh working-directory: weaver/samples/fabric/fabric-cli - + - name: Asset Exchange Fabric CLI Tests run: | COUNT=0 @@ -107,45 +110,45 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Set up Go uses: actions/setup-go@v4.0.0 with: go-version: '1.20.2' - - - name: Use Node.js 14.x + + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x - + node-version: ${{ env.NODEJS_VERSION }} + - name: Use Protoc 3.15 run: | curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - + # PROTOS - name: Build JS Protos run: | export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" make build working-directory: weaver/common/protos-js - + # Build Dependencies - name: Build Fabric Interop SDK run: make build-local working-directory: weaver/sdks/fabric/interoperation-node-sdk - + - name: Build Fabric CLI run: make build-local working-directory: weaver/samples/fabric/fabric-cli - + # FABRIC NETWORK - name: Start Fabric Network run: make start-interop-local CHAINCODE_NAME=simpleasset working-directory: weaver/tests/network-setups/fabric/dev - + # FABRIC CLI - name: Setup Fabric CLI Config run: | @@ -161,11 +164,11 @@ jobs: ./bin/fabric-cli env set CONFIG_PATH ${GITHUB_WORKSPACE}/weaver/samples/fabric/fabric-cli/config.json cat .env working-directory: weaver/samples/fabric/fabric-cli - + - name: Fabric CLI Init run: ./scripts/initAsset.sh working-directory: weaver/samples/fabric/fabric-cli - + - name: Asset Exchange Fabric CLI Tests run: | COUNT=0 diff --git a/.github/workflows/test_weaver-asset-transfer.yaml b/.github/workflows/test_weaver-asset-transfer.yaml index 7b6ed3ea628..9d3fa100692 100644 --- a/.github/workflows/test_weaver-asset-transfer.yaml +++ b/.github/workflows/test_weaver-asset-transfer.yaml @@ -6,6 +6,9 @@ name: Test Asset Transfer +env: + NODEJS_VERSION: v18.18.2 + # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the main branch @@ -44,10 +47,10 @@ jobs: with: go-version: '1.20.2' - - name: Use Node.js 14.x + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x + node-version: ${{ env.NODEJS_VERSION }} # CORDA NETWORK - name: Generate github.properties @@ -56,17 +59,17 @@ jobs: echo "username=${GITHUB_ACTOR}" >> github.properties echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties echo "url=https://maven.pkg.github.com/${GITHUB_ACTOR}/cacti" >> github.properties - + echo "Using ${GITHUB_ACTOR} user." echo "username=${GITHUB_ACTOR}" >> github.main.properties echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.main.properties echo "url=https://maven.pkg.github.com/hyperledger/cacti" >> github.main.properties - + ./scripts/get-cordapps.sh || mv github.main.properties github.properties - + cat github.properties working-directory: weaver/tests/network-setups/corda - + - name: Start Corda Network run: | sed -i "/docker logs corda_partya_1 -f/"' s/^/#/' "scripts/start-nodes.sh" @@ -101,7 +104,7 @@ jobs: - name: Start Relay for Corda_Network run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda' working-directory: weaver/core/relay - + - name: Start Relay for Corda_Network2 run: make start-server COMPOSE_ARG='--env-file docker/testnet-envs/.env.corda2' working-directory: weaver/core/relay @@ -154,7 +157,7 @@ jobs: - name: Start Corda Driver run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda' working-directory: weaver/core/drivers/corda-driver - + - name: Start Corda_Network2 Driver run: make deploy COMPOSE_ARG='--env-file docker-testnet-envs/.env.corda2' working-directory: weaver/core/drivers/corda-driver @@ -236,7 +239,7 @@ jobs: sed -i "s#localhost:10006#corda_partya_1:10003#g" remote-network-config.json sed -i "s#localhost:30006#corda_network2_partya_1:10003#g" remote-network-config.json working-directory: weaver/samples/corda/corda-simple-application/clients/src/main/resources/config - + - name: Corda CLI Initialize Vault run: make initialise-vault-asset-transfer-docker working-directory: weaver/samples/corda/corda-simple-application @@ -245,12 +248,12 @@ jobs: run: | COUNT=0 TOTAL=9 - + # Issue t1:5 tokens to partyA NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 t1 1> tmp.out cat tmp.out | grep "AssetState(quantity=5, tokenType=t1, owner=O=PartyA" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # CORDA2-CORDA # Pledge Asset NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="3600" --import-network-id='Corda_Network2' --recipient='O=PartyA, L=London, C=GB' --param='t1:5' 1> tmp.out @@ -268,38 +271,38 @@ jobs: NETWORK_NAME='Corda_Network2' CORDA_PORT=30006 ./clients/build/install/clients/bin/clients transfer claim-remote-asset --pledge-id=$PID --locker='O=PartyA, L=London, C=GB' --transfer-category='token.corda' --export-network-id='Corda_Network' --param='t1:5' --import-relay-address='localhost:9082' 1> tmp.out cat tmp.out | grep "Pledged asset claim response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t1 1> tmp.out cat tmp.out | grep "\[\]" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out CORDA_PORT=30006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t1 1> tmp.out cat tmp.out | grep "AssetState(quantity=5, tokenType=t1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # CORDA-CORDA2 - + # Issue and Pledge t2:5 tokens NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 t2 1> tmp.out NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="20" --import-network-id='Corda_Network2' --recipient='O=PartyA, L=London, C=GB' --param='t2:5' 1> tmp.out PID=$(cat tmp.out | grep "AssetPledgeState created with pledge-id " | awk -F "'" '{print $2}') sleep 20 - + # Is Asset Pledged CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer is-asset-pledged -pid $PID 1> tmp.out cat tmp.out | grep "Is asset pledged for transfer response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + NETWORK_NAME=Corda_Network CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer reclaim-pledged-asset --pledge-id=$PID --export-relay-address='localhost:9081' --transfer-category='token.corda' --import-network-id='Corda_Network2' --param='t2:5' 1> tmp.out cat tmp.out | grep "Pledged Asset Reclaim Response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t2 1> tmp.out cat tmp.out | grep "AssetState(quantity=5, tokenType=t2, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # RESULT echo "Passed $COUNT/$TOTAL Tests." - + if [ $COUNT == $TOTAL ]; then exit 0 else @@ -424,14 +427,14 @@ jobs: exit 1 fi working-directory: weaver/samples/fabric/fabric-cli - - + + # CORDA - FABRIC - name: Corda - Fabric Asset Transfer test 1 - Pledge run: | COUNT=0 TOTAL=2 - + # CORDA - FABRIC1 # Issue and Pledge token1:5 tokens to partyA NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 token1 1> tmp.out @@ -448,7 +451,7 @@ jobs: # RESULT echo "Passed $COUNT/$TOTAL Tests." - + echo "CF_PID=$PID" >> $GITHUB_ENV if [ $COUNT == $TOTAL ]; then @@ -456,26 +459,26 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/corda/corda-simple-application - + - name: Corda - Fabric Asset Transfer test 2 - Claim run: | COUNT=0 TOTAL=3 - + PID=${{ env.CF_PID }} - + # CORDA - FABRIC1 # Claim in Fabric (pledged in Corda) ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out tail -n 2 tmp.out | grep "Result from network query: token1=\"9950\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + ./bin/fabric-cli asset transfer claim --source-network='Corda_Network' --dest-network=network1 --user='alice' --owner='O=PartyA, L=London, C=GB' --type='token.corda' --pledge-id=$PID --param=token1:5 &> tmp.out tail -n 1 tmp.out | grep "Called Function ClaimRemoteTokenAsset. With Args: $PID" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out tail -n 2 tmp.out | grep "Result from network query: token1=\"9955\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out @@ -488,14 +491,14 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/fabric/fabric-cli - + - name: Corda - Fabric Asset Transfer test 3 - Reclaim run: | COUNT=0 TOTAL=3 - + # CORDA - FABRIC1 # Issue and Pledge token1:10 tokens to partyA NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 10 token1 1> tmp.out @@ -512,7 +515,7 @@ jobs: NETWORK_NAME=Corda_Network CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer reclaim-pledged-asset --pledge-id=$PID --export-relay-address='localhost:9081' --transfer-category='token.fabric' --import-network-id='network1' --param='token1:10' 1> tmp.out cat tmp.out | grep "Pledged Asset Reclaim Response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type token1 1> tmp.out cat tmp.out | grep "AssetState(quantity=10, tokenType=token1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out @@ -525,18 +528,18 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/corda/corda-simple-application - + - name: Fabric - Corda Asset Transfer test 1 - Pledge run: | COUNT=0 TOTAL=1 - + ./bin/fabric-cli asset transfer pledge --source-network='network1' --dest-network='Corda_Network' --recipient='O=PartyA, L=London, C=GB' --expiry-secs=3600 --type='token' --units=50 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out PID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - + ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out tail -n 2 tmp.out | grep "Result from network query: token1=\"9905\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out @@ -545,7 +548,7 @@ jobs: # RESULT echo "Passed $COUNT/$TOTAL Tests." - + echo "FC_PID=$PID" >> $GITHUB_ENV if [ $COUNT == $TOTAL ]; then @@ -553,22 +556,22 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/fabric/fabric-cli - + - name: Fabric - Corda Asset Transfer test 2 - Claim run: | COUNT=0 TOTAL=2 - + PID=${{ env.FC_PID }} - + # FABRIC - CORDA # Claim Remote Asset CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer claim-remote-asset --pledge-id=$PID --locker='alice' --transfer-category='token.fabric' --export-network-id='network1' --param='token1:50' --import-relay-address='localhost:9082' 1> tmp.out cat tmp.out | grep "Pledged asset claim response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type token1 1> tmp.out cat tmp.out | grep "AssetState(quantity=50, tokenType=token1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out @@ -581,21 +584,21 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/corda/corda-simple-application - name: Fabric - Corda Asset Transfer test 3 - Reclaim run: | COUNT=0 TOTAL=3 - + ./bin/fabric-cli asset transfer pledge --source-network='network1' --dest-network='Corda_Network' --recipient='O=PartyA, L=London, C=GB' --expiry-secs=30 --type='token' --units=50 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out PID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out tail -n 2 tmp.out | grep "Result from network query: token1=\"9855\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + sleep 30 ./bin/fabric-cli asset transfer reclaim --source-network='network1' --user='alice' --type='token.corda' --pledge-id=$PID --param=token1:50 &> tmp.out @@ -614,45 +617,45 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/fabric/fabric-cli - + - name: DEBUG Logs - corda partya if: failure() run: docker logs corda_partya_1 - + - name: DEBUG Logs - corda network2 partya if: failure() run: docker logs corda_network2_partya_1 - + - name: DEBUG Logs - fabric n1 relay if: failure() run: docker logs relay-network1 - + - name: DEBUG Logs - fabric n2 relay if: failure() run: docker logs relay-network2 - + - name: DEBUG Logs - corda relay if: failure() run: docker logs relay-corda - + - name: DEBUG Logs - corda2 relay if: failure() run: docker logs relay-corda2 - + - name: DEBUG Logs - fabric n1 driver if: failure() run: docker logs driver-fabric-network1 - + - name: DEBUG Logs - fabric n2 driver if: failure() run: docker logs driver-fabric-network2 - + - name: DEBUG Logs - corda driver if: failure() run: docker logs driver-corda-Corda_Network - + - name: DEBUG Logs - corda2 driver if: failure() run: docker logs driver-corda-Corda_Network2 @@ -678,10 +681,10 @@ jobs: with: go-version: '1.20.2' - - name: Use Node.js 16.x + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 16.x + node-version: ${{ env.NODEJS_VERSION }} - name: Install RUST Toolchain minimal stable with clippy and rustfmt uses: actions-rs/toolchain@v1.0.6 @@ -726,11 +729,11 @@ jobs: - name: Build Corda Interop App run: make build-local working-directory: weaver/core/network/corda-interop-app - + - name: Build Corda Interop SDK run: make build working-directory: weaver/sdks/corda - + - name: Build Corda SimpleApplication run: make build-local working-directory: weaver/samples/corda/corda-simple-application @@ -758,7 +761,7 @@ jobs: - name: Build Corda Driver run: make build-local working-directory: weaver/core/drivers/corda-driver - + # CORDA NETWORK - name: Start Corda Network run: | @@ -791,7 +794,7 @@ jobs: - name: Start Relay for Corda_Network run: RELAY_CONFIG=config/Corda_Relay.toml cargo run --bin server &> relay-corda.out & working-directory: weaver/core/relay - + - name: Start Relay for Corda_Network2 run: RELAY_CONFIG=config/Corda_Relay2.toml cargo run --bin server &> relay-corda2.out & working-directory: weaver/core/relay @@ -855,7 +858,7 @@ jobs: - name: Start Corda_Network Driver run: ./build/install/driver-corda/bin/driver-corda &> corda-driver.out & working-directory: weaver/core/drivers/corda-driver - + - name: Start Corda_Network2 Driver run: DRIVER_PORT=9098 ./build/install/driver-corda/bin/driver-corda &> corda2-driver.out & working-directory: weaver/core/drivers/corda-driver @@ -912,7 +915,7 @@ jobs: run: | cp remote-network-config.json.template remote-network-config.json working-directory: weaver/samples/corda/corda-simple-application/clients/src/main/resources/config - + - name: Corda CLI Initialize Vault run: make initialise-vault-asset-transfer working-directory: weaver/samples/corda/corda-simple-application @@ -921,12 +924,12 @@ jobs: run: | COUNT=0 TOTAL=9 - + # Issue t1:5 tokens to partyA NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 t1 1> tmp.out cat tmp.out | grep "AssetState(quantity=5, tokenType=t1, owner=O=PartyA" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # CORDA2-CORDA # Pledge Asset NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="3600" --import-network-id='Corda_Network2' --recipient='O=PartyA, L=London, C=GB' --param='t1:5' 1> tmp.out @@ -944,38 +947,38 @@ jobs: NETWORK_NAME='Corda_Network2' CORDA_PORT=30006 ./clients/build/install/clients/bin/clients transfer claim-remote-asset --pledge-id=$PID --locker='O=PartyA, L=London, C=GB' --transfer-category='token.corda' --export-network-id='Corda_Network' --param='t1:5' --import-relay-address='localhost:9082' 1> tmp.out cat tmp.out | grep "Pledged asset claim response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t1 1> tmp.out cat tmp.out | grep "\[\]" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out CORDA_PORT=30006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t1 1> tmp.out cat tmp.out | grep "AssetState(quantity=5, tokenType=t1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # CORDA-CORDA2 - + # Issue and Pledge t2:5 tokens NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 t2 1> tmp.out NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer pledge-asset --fungible --timeout="20" --import-network-id='Corda_Network2' --recipient='O=PartyA, L=London, C=GB' --param='t2:5' 1> tmp.out PID=$(cat tmp.out | grep "AssetPledgeState created with pledge-id " | awk -F "'" '{print $2}') sleep 20 - + # Is Asset Pledged CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer is-asset-pledged -pid $PID 1> tmp.out cat tmp.out | grep "Is asset pledged for transfer response: false" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + NETWORK_NAME=Corda_Network CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer reclaim-pledged-asset --pledge-id=$PID --export-relay-address='localhost:9081' --transfer-category='token.corda' --import-network-id='Corda_Network2' --param='t2:5' 1> tmp.out cat tmp.out | grep "Pledged Asset Reclaim Response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type t2 1> tmp.out cat tmp.out | grep "AssetState(quantity=5, tokenType=t2, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + # RESULT echo "Passed $COUNT/$TOTAL Tests." - + if [ $COUNT == $TOTAL ]; then exit 0 else @@ -1100,14 +1103,14 @@ jobs: exit 1 fi working-directory: weaver/samples/fabric/fabric-cli - - + + # CORDA - FABRIC - name: Corda - Fabric Asset Transfer test 1 - Pledge run: | COUNT=0 TOTAL=2 - + # CORDA - FABRIC1 # Issue and Pledge token1:5 tokens to partyA NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 5 token1 1> tmp.out @@ -1124,7 +1127,7 @@ jobs: # RESULT echo "Passed $COUNT/$TOTAL Tests." - + echo "CF_PID=$PID" >> $GITHUB_ENV if [ $COUNT == $TOTAL ]; then @@ -1132,26 +1135,26 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/corda/corda-simple-application - + - name: Corda - Fabric Asset Transfer test 2 - Claim run: | COUNT=0 TOTAL=3 - + PID=${{ env.CF_PID }} - + # CORDA - FABRIC1 # Claim in Fabric (pledged in Corda) ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out tail -n 2 tmp.out | grep "Result from network query: token1=\"9950\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + ./bin/fabric-cli asset transfer claim --source-network='Corda_Network' --dest-network=network1 --user='alice' --owner='O=PartyA, L=London, C=GB' --type='token.corda' --pledge-id=$PID --param=token1:5 &> tmp.out tail -n 1 tmp.out | grep "Called Function ClaimRemoteTokenAsset. With Args: $PID" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out tail -n 2 tmp.out | grep "Result from network query: token1=\"9955\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out @@ -1164,14 +1167,14 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/fabric/fabric-cli - + - name: Corda - Fabric Asset Transfer test 3 - Reclaim run: | COUNT=0 TOTAL=3 - + # CORDA - FABRIC1 # Issue and Pledge token1:10 tokens to partyA NETWORK_NAME='Corda_Network' CORDA_PORT=10006 ./clients/build/install/clients/bin/clients issue-asset-state 10 token1 1> tmp.out @@ -1188,7 +1191,7 @@ jobs: NETWORK_NAME=Corda_Network CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer reclaim-pledged-asset --pledge-id=$PID --export-relay-address='localhost:9081' --transfer-category='token.fabric' --import-network-id='network1' --param='token1:10' 1> tmp.out cat tmp.out | grep "Pledged Asset Reclaim Response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type token1 1> tmp.out cat tmp.out | grep "AssetState(quantity=10, tokenType=token1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out @@ -1201,18 +1204,18 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/corda/corda-simple-application - + - name: Fabric - Corda Asset Transfer test 1 - Pledge run: | COUNT=0 TOTAL=1 - + ./bin/fabric-cli asset transfer pledge --source-network='network1' --dest-network='Corda_Network' --recipient='O=PartyA, L=London, C=GB' --expiry-secs=3600 --type='token' --units=50 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out PID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') - + ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out tail -n 2 tmp.out | grep "Result from network query: token1=\"9905\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out @@ -1221,7 +1224,7 @@ jobs: # RESULT echo "Passed $COUNT/$TOTAL Tests." - + echo "FC_PID=$PID" >> $GITHUB_ENV if [ $COUNT == $TOTAL ]; then @@ -1229,22 +1232,22 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/fabric/fabric-cli - + - name: Fabric - Corda Asset Transfer test 2 - Claim run: | COUNT=0 TOTAL=2 - + PID=${{ env.FC_PID }} - + # FABRIC - CORDA # Claim Remote Asset CORDA_PORT=10006 ./clients/build/install/clients/bin/clients transfer claim-remote-asset --pledge-id=$PID --locker='alice' --transfer-category='token.fabric' --export-network-id='network1' --param='token1:50' --import-relay-address='localhost:9082' 1> tmp.out cat tmp.out | grep "Pledged asset claim response: Right(b=SignedTransaction(id=" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + CORDA_PORT=10006 ./clients/build/install/clients/bin/clients get-asset-states-by-type token1 1> tmp.out cat tmp.out | grep "AssetState(quantity=50, tokenType=token1, owner=O=PartyA, L=London, C=GB, " && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out @@ -1257,21 +1260,21 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/corda/corda-simple-application - name: Fabric - Corda Asset Transfer test 3 - Reclaim run: | COUNT=0 TOTAL=3 - + ./bin/fabric-cli asset transfer pledge --source-network='network1' --dest-network='Corda_Network' --recipient='O=PartyA, L=London, C=GB' --expiry-secs=30 --type='token' --units=50 --owner=alice --data-file=src/data/tokensForTransfer.json &> tmp.out PID=$(cat tmp.out | grep "Asset pledged with ID " | sed -e 's/Asset pledged with ID //') ./bin/fabric-cli chaincode query --user=alice mychannel simpleassettransfer GetMyWallet '[]' --local-network=network1 &> tmp.out tail -n 2 tmp.out | grep "Result from network query: token1=\"9855\"" && COUNT=$(( COUNT + 1 )) && echo "PASS" cat tmp.out - + sleep 30 ./bin/fabric-cli asset transfer reclaim --source-network='network1' --user='alice' --type='token.corda' --pledge-id=$PID --param=token1:50 &> tmp.out @@ -1290,45 +1293,45 @@ jobs: else exit 1 fi - + working-directory: weaver/samples/fabric/fabric-cli - + - name: DEBUG Logs - corda partya if: failure() run: docker logs corda_partya_1 - + - name: DEBUG Logs - corda network2 partya if: failure() run: docker logs corda_network2_partya_1 - + - name: DEBUG Logs - fabric n1 relay if: failure() run: cat weaver/core/relay/relay-n1.out - + - name: DEBUG Logs - fabric n2 relay if: failure() run: cat weaver/core/relay/relay-n2.out - + - name: DEBUG Logs - corda relay if: failure() run: cat weaver/core/relay/relay-corda.out - + - name: DEBUG Logs - corda2 relay if: failure() run: cat weaver/core/relay/relay-corda2.out - + - name: DEBUG Logs - fabric n1 driver if: failure() run: cat weaver/core/drivers/fabric-driver/fdriver-n1.out - + - name: DEBUG Logs - fabric n2 driver if: failure() run: cat weaver/core/drivers/fabric-driver/fdriver-n2.out - + - name: DEBUG Logs - corda driver if: failure() run: cat weaver/core/drivers/corda-driver/corda-driver.out - + - name: DEBUG Logs - corda2 driver if: failure() run: cat weaver/core/drivers/corda-driver/corda2-driver.out \ No newline at end of file diff --git a/.github/workflows/test_weaver-data-sharing.yaml b/.github/workflows/test_weaver-data-sharing.yaml index 7c00c78c5aa..7bf92f27da1 100644 --- a/.github/workflows/test_weaver-data-sharing.yaml +++ b/.github/workflows/test_weaver-data-sharing.yaml @@ -6,6 +6,9 @@ name: Test Data Sharing +env: + NODEJS_VERSION: v18.18.2 + # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the main branch @@ -44,10 +47,10 @@ jobs: with: go-version: '1.20.2' - - name: Use Node.js 14.x + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x + node-version: ${{ env.NODEJS_VERSION }} # CORDA NETWORK - name: Generate github.properties @@ -337,43 +340,43 @@ jobs: exit 1 fi working-directory: weaver/samples/fabric/fabric-cli - + - name: DEBUG Logs - corda partya if: failure() run: docker logs corda_partya_1 - + - name: DEBUG Logs - corda network2 partya if: failure() run: docker logs corda_network2_partya_1 - + - name: DEBUG Logs - fabric n1 relay if: failure() run: docker logs relay-network1 - + - name: DEBUG Logs - fabric n2 relay if: failure() run: docker logs relay-network2 - + - name: DEBUG Logs - corda relay if: failure() run: docker logs relay-corda - + - name: DEBUG Logs - corda2 relay if: failure() run: docker logs relay-corda2 - + - name: DEBUG Logs - fabric n1 driver if: failure() run: docker logs driver-fabric-network1 - + - name: DEBUG Logs - fabric n2 driver if: failure() run: docker logs driver-fabric-network2 - + - name: DEBUG Logs - corda driver if: failure() run: docker logs driver-corda-Corda_Network - + - name: DEBUG Logs - corda2 driver if: failure() run: docker logs driver-corda-Corda_Network2 @@ -399,10 +402,10 @@ jobs: with: go-version: '1.20.2' - - name: Use Node.js 14.x + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x + node-version: ${{ env.NODEJS_VERSION }} - name: Use Protoc 3.15 run: | @@ -743,43 +746,43 @@ jobs: exit 1 fi working-directory: weaver/samples/fabric/fabric-cli - + - name: DEBUG Logs - corda partya if: failure() run: docker logs corda_partya_1 - + - name: DEBUG Logs - corda network2 partya if: failure() run: docker logs corda_network2_partya_1 - + - name: DEBUG Logs - fabric n1 relay if: failure() run: docker logs relay-network1 - + - name: DEBUG Logs - fabric n2 relay if: failure() run: docker logs relay-network2 - + - name: DEBUG Logs - corda relay if: failure() run: docker logs relay-corda - + - name: DEBUG Logs - corda2 relay if: failure() run: docker logs relay-corda2 - + - name: DEBUG Logs - fabric n1 driver if: failure() run: docker logs driver-fabric-network1 - + - name: DEBUG Logs - fabric n2 driver if: failure() run: docker logs driver-fabric-network2 - + - name: DEBUG Logs - corda driver if: failure() run: docker logs driver-corda-Corda_Network - + - name: DEBUG Logs - corda2 driver if: failure() run: docker logs driver-corda-Corda_Network2 @@ -805,10 +808,10 @@ jobs: with: go-version: '1.20.2' - - name: Use Node.js 16.x + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 16.x + node-version: ${{ env.NODEJS_VERSION }} - name: Install RUST Toolchain minimal stable with clippy and rustfmt uses: actions-rs/toolchain@v1.0.6 @@ -1153,43 +1156,43 @@ jobs: exit 1 fi working-directory: weaver/samples/fabric/fabric-cli - + - name: DEBUG Logs - corda partya if: failure() run: docker logs corda_partya_1 - + - name: DEBUG Logs - corda network2 partya if: failure() run: docker logs corda_network2_partya_1 - + - name: DEBUG Logs - fabric n1 relay if: failure() run: cat weaver/core/relay/relay-n1.out - + - name: DEBUG Logs - fabric n2 relay if: failure() run: cat weaver/core/relay/relay-n2.out - + - name: DEBUG Logs - corda relay if: failure() run: cat weaver/core/relay/relay-corda.out - + - name: DEBUG Logs - corda2 relay if: failure() run: cat weaver/core/relay/relay-corda2.out - + - name: DEBUG Logs - fabric n1 driver if: failure() run: cat weaver/core/drivers/fabric-driver/fdriver-n1.out - + - name: DEBUG Logs - fabric n2 driver if: failure() run: cat weaver/core/drivers/fabric-driver/fdriver-n2.out - + - name: DEBUG Logs - corda driver if: failure() run: cat weaver/core/drivers/corda-driver/corda-driver.out - + - name: DEBUG Logs - corda2 driver if: failure() run: cat weaver/core/drivers/corda-driver/corda2-driver.out diff --git a/.github/workflows/test_weaver-docker-build.yaml b/.github/workflows/test_weaver-docker-build.yaml index 35e1044f0fa..32f88f26c00 100644 --- a/.github/workflows/test_weaver-docker-build.yaml +++ b/.github/workflows/test_weaver-docker-build.yaml @@ -4,6 +4,9 @@ name: Test All Docker Images Build +env: + NODEJS_VERSION: v18.18.2 + on: push: branches: [ main ] @@ -21,112 +24,112 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Build Image run: make build-server-local working-directory: weaver/core/relay - + build_docker_fabric_driver_local: # if: ${{ false }} runs-on: ubuntu-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - - name: Use Node.js 14.x + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x - + node-version: ${{ env.NODEJS_VERSION }} + - name: Use Protoc 3.15 run: | curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc - + - name: Build JS Protos (Local) run: | export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" make build working-directory: weaver/common/protos-js - + - name: Build Fabric Interop Node SDK (Local) run: make build-local working-directory: weaver/sdks/fabric/interoperation-node-sdk - + - name: Build Image (Local) run: make build-image-local working-directory: weaver/core/drivers/fabric-driver - + build_docker_fabric_driver_packages: if: ${{ false }} runs-on: ubuntu-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Setup .npmrc run: | cp .npmrc.template .npmrc sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc cat .npmrc working-directory: weaver/core/drivers/fabric-driver - + - name: Build Image run: make build-image working-directory: weaver/core/drivers/fabric-driver - + build_docker_corda_driver_local: runs-on: ubuntu-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Set up JDK 8 uses: actions/setup-java@v3.11.0 with: java-version: '8' distribution: 'adopt' - + - name: Build Protos (Local) run: make build working-directory: weaver/common/protos-java-kt - + - name: Build Corda Interop App (Local) run: make build-local working-directory: weaver/core/network/corda-interop-app - + - name: Build Corda Interop SDK (Local) run: make build working-directory: weaver/sdks/corda - + - name: Build Image (Local) run: make image-local working-directory: weaver/core/drivers/corda-driver - + build_docker_corda_driver_packages: if: ${{ false }} runs-on: ubuntu-latest steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Generate github.properties run: | echo "Using ${GITHUB_ACTOR} user." echo "username=${GITHUB_ACTOR}" >> github.properties echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.properties echo "url=https://maven.pkg.github.com/${GITHUB_ACTOR}/cacti" >> github.properties - + echo "Using ${GITHUB_ACTOR} user." echo "username=${GITHUB_ACTOR}" >> github.main.properties echo "password=${{ secrets.GITHUB_TOKEN }}" >> github.main.properties echo "url=https://maven.pkg.github.com/hyperledger/cacti" >> github.main.properties - + make build || mv github.main.properties github.properties make clean - + cat github.properties working-directory: weaver/core/drivers/corda-driver - + - name: Build Image run: make image working-directory: weaver/core/drivers/corda-driver @@ -136,26 +139,26 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - - name: Use Node.js 14.x + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x - + node-version: ${{ env.NODEJS_VERSION }} + - name: Use Protoc 3.15 run: | curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc - + - name: Build JS Protos (Local) run: | export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" make build working-directory: weaver/common/protos-js - + - name: Build Fabric Interop Node SDK (Local) run: make build-local working-directory: weaver/sdks/fabric/interoperation-node-sdk - + - name: Build Image run: make build-image-local working-directory: weaver/core/identity-management/iin-agent diff --git a/.github/workflows/test_weaver-go.yaml b/.github/workflows/test_weaver-go.yaml index 90faa24ea05..c6664d3c402 100644 --- a/.github/workflows/test_weaver-go.yaml +++ b/.github/workflows/test_weaver-go.yaml @@ -24,11 +24,11 @@ jobs: uses: actions/setup-go@v4.0.0 with: go-version: '1.20.2' - + - name: Vendor run: make run-vendor working-directory: weaver/core/network/fabric-interop-cc/contracts/interop - + - name: Build run: go build -v ./... working-directory: weaver/core/network/fabric-interop-cc/contracts/interop @@ -47,7 +47,7 @@ jobs: uses: actions/setup-go@v4.0.0 with: go-version: '1.20.2' - + - name: Vendor run: make run-vendor working-directory: weaver/core/network/fabric-interop-cc/interfaces/asset-mgmt @@ -81,7 +81,7 @@ jobs: - name: Test run: go test -v ./... working-directory: weaver/samples/fabric/simplestate - + unit_test_simpleasset: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/test_weaver-node-pkgs.yaml b/.github/workflows/test_weaver-node-pkgs.yaml index 45e8e8182eb..31ff9469184 100644 --- a/.github/workflows/test_weaver-node-pkgs.yaml +++ b/.github/workflows/test_weaver-node-pkgs.yaml @@ -7,6 +7,10 @@ name: Unit Test Weaver Node Packages +env: + NODEJS_LTS_VERSION: v18.18.2 + NODEJS_NEXT_LTS_VERSION: v20.9.0 + on: push: branches: [ main ] @@ -24,7 +28,7 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x] + node-version: [v18.18.2, v20.9.0] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: @@ -55,7 +59,7 @@ jobs: strategy: matrix: - node-version: [16.x] + node-version: [v18.18.2] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: @@ -88,16 +92,16 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - - - name: Use Node.js 16.x + + - name: Use Node.js ${{ env.NODEJS_LTS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 16.x + node-version: ${{ env.NODEJS_LTS_VERSION }} - name: NPM INSTALL run: npm install working-directory: weaver/docs - + - name: Build run: npm run build working-directory: weaver/docs diff --git a/.github/workflows/weaver_deploy_node-pkgs.yml b/.github/workflows/weaver_deploy_node-pkgs.yml index 02fd8214aad..ed99a7713df 100644 --- a/.github/workflows/weaver_deploy_node-pkgs.yml +++ b/.github/workflows/weaver_deploy_node-pkgs.yml @@ -4,11 +4,14 @@ name: Deploy Node JS Packages +env: + NODEJS_VERSION: v18.18.2 + on: push: tags: - v* - + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -23,30 +26,30 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - - - name: Use Node.js 14.x + + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x - + node-version: ${{ env.NODEJS_VERSION }} + - name: Use Protoc 3.15 run: | curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc - + - name: Generate .npmrc run: | cp .npmrc.template .npmrc sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc cat .npmrc working-directory: weaver/common/protos-js - + - name: Build run: | export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" make build working-directory: weaver/common/protos-js - + - name: Check if package already exists run : | PKG_NAME=$(node -p "require('./package.json').name") @@ -58,14 +61,14 @@ jobs: echo "PROTOS_JS_PUBLISH=true" >> $GITHUB_ENV fi working-directory: weaver/common/protos-js - + - name: Publish if: ${{ env.PROTOS_JS_PUBLISH == 'true' }} run: | export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" make publish working-directory: weaver/common/protos-js - + publish-fabric-sdk: if: ${{ always() && github.repository_owner == 'hyperledger' }} needs: [publish-protos-js] @@ -77,23 +80,23 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - - - name: Use Node.js 14.x + + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x - + node-version: ${{ env.NODEJS_VERSION }} + - name: Generate .npmrc run: | cp .npmrc.template .npmrc sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc cat .npmrc working-directory: weaver/sdks/fabric/interoperation-node-sdk - + - name: Build run: make build working-directory: weaver/sdks/fabric/interoperation-node-sdk - + - name: Check if package already exists run : | PKG_NAME=$(node -p "require('./package.json').name") @@ -105,12 +108,12 @@ jobs: echo "WEAVER_FABRIC_SDK_PUBLISH=true" >> $GITHUB_ENV fi working-directory: weaver/sdks/fabric/interoperation-node-sdk - + - name: Publish if: ${{ env.WEAVER_FABRIC_SDK_PUBLISH == 'true' }} run: make publish working-directory: weaver/sdks/fabric/interoperation-node-sdk - + publish-besu-sdk: if: ${{ always() && github.repository_owner == 'hyperledger' }} needs: [publish-protos-js] @@ -122,23 +125,23 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - - - name: Use Node.js 14.x + + - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v3.6.0 with: - node-version: 14.x - + node-version: ${{ env.NODEJS_VERSION }} + - name: Generate .npmrc run: | cp .npmrc.template .npmrc sed -i "s//${{ secrets.GITHUB_TOKEN }}/g" .npmrc cat .npmrc working-directory: weaver/sdks/besu/node - + - name: Build run: make build working-directory: weaver/sdks/besu/node - + - name: Check if package already exists run : | PKG_NAME=$(node -p "require('./package.json').name") @@ -150,12 +153,12 @@ jobs: echo "WEAVER_BESU_SDK_PUBLISH=true" >> $GITHUB_ENV fi working-directory: weaver/sdks/besu/node - + - name: Publish if: ${{ env.WEAVER_BESU_SDK_PUBLISH == 'true' }} run: make publish working-directory: weaver/sdks/besu/node - + publish-driver-image: if: ${{ always() && github.repository_owner == 'hyperledger' }} needs: [publish-protos-js, publish-fabric-sdk] @@ -167,14 +170,14 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Login to GitHub Container Registry uses: docker/login-action@v2.1.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: Generate .npmrc run: | cp .npmrc.template .npmrc @@ -190,12 +193,12 @@ jobs: if: ${{ env.FABRIC_DRIVER_PUSH == 'true' }} run: make push-image working-directory: weaver/core/drivers/fabric-driver - + - name: Push latest tag if: ${{ env.FABRIC_DRIVER_PUSH == 'true' }} run: make push-image-latest working-directory: weaver/core/drivers/fabric-driver - + publish-iin-agent-image: if: ${{ always() && github.repository_owner == 'hyperledger' }} needs: [publish-protos-js, publish-fabric-sdk] @@ -207,14 +210,14 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3.5.2 - + - name: Login to GitHub Container Registry uses: docker/login-action@v2.1.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - + - name: Generate .npmrc run: | cp .npmrc.template .npmrc @@ -230,7 +233,7 @@ jobs: if: ${{ env.IINAGENT_PUSH == 'true' }} run: make push-image working-directory: weaver/core/identity-management/iin-agent - + - name: Push latest tag if: ${{ env.IINAGENT_PUSH == 'true' }} run: make push-image-latest diff --git a/examples/cactus-check-connection-ethereum-validator/package.json b/examples/cactus-check-connection-ethereum-validator/package.json index 8cacd1e81ae..179c2f5639e 100644 --- a/examples/cactus-check-connection-ethereum-validator/package.json +++ b/examples/cactus-check-connection-ethereum-validator/package.json @@ -29,5 +29,9 @@ "@types/js-yaml": "4.0.8", "@types/node": "15.14.9", "@types/shelljs": "0.8.14" + }, + "engines": { + "node": ">=18", + "npm": ">=8" } } diff --git a/examples/cactus-example-carbon-accounting-backend/package.json b/examples/cactus-example-carbon-accounting-backend/package.json index 8a4056de1e5..552a363ed79 100644 --- a/examples/cactus-example-carbon-accounting-backend/package.json +++ b/examples/cactus-example-carbon-accounting-backend/package.json @@ -85,8 +85,8 @@ "json-stable-stringify": "1.0.2" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/examples/cactus-example-carbon-accounting-business-logic-plugin/package.json b/examples/cactus-example-carbon-accounting-business-logic-plugin/package.json index bbf7fd4c3ec..8bd6423f9b8 100644 --- a/examples/cactus-example-carbon-accounting-business-logic-plugin/package.json +++ b/examples/cactus-example-carbon-accounting-business-logic-plugin/package.json @@ -76,8 +76,8 @@ "@types/uuid": "8.3.4" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/examples/cactus-example-carbon-accounting-frontend/package.json b/examples/cactus-example-carbon-accounting-frontend/package.json index 7b2d14555d6..cccf6dc0911 100644 --- a/examples/cactus-example-carbon-accounting-frontend/package.json +++ b/examples/cactus-example-carbon-accounting-frontend/package.json @@ -88,8 +88,8 @@ "tls-browserify": "0.2.2" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/examples/cactus-example-cbdc-bridging-backend/package.json b/examples/cactus-example-cbdc-bridging-backend/package.json index 396c0687285..c2b1a2d5d80 100644 --- a/examples/cactus-example-cbdc-bridging-backend/package.json +++ b/examples/cactus-example-cbdc-bridging-backend/package.json @@ -103,8 +103,8 @@ "ts-node": "^7.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/examples/cactus-example-cbdc-bridging-frontend/package.json b/examples/cactus-example-cbdc-bridging-frontend/package.json index e2ef28cdb77..88b6f98e24a 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/package.json +++ b/examples/cactus-example-cbdc-bridging-frontend/package.json @@ -35,27 +35,12 @@ "email": "andre.augusto@tecnico.ulisboa.pt" } ], - "dependencies": { - "@emotion/react": "11.11.1", - "@emotion/styled": "11.11.0", - "@mui/material": "5.14.13", - "@mui/styles": "5.14.13", - "axios": "1.5.1", - "react": "18.2.0", - "react-dom": "18.2.0", - "uuid": "9.0.1" - }, - "devDependencies": { - "eslint-config-react-app": "7.0.1", - "react-scripts": "5.0.1" - }, "scripts": { - "start": "react-scripts start", "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject" + "eject": "react-scripts eject", + "start": "react-scripts start", + "test": "react-scripts test" }, - "eslintConfig": {}, "browserslist": { "production": [ ">0.2%", @@ -67,5 +52,24 @@ "last 1 firefox version", "last 1 safari version" ] + }, + "eslintConfig": {}, + "dependencies": { + "@emotion/react": "11.11.1", + "@emotion/styled": "11.11.0", + "@mui/material": "5.14.13", + "@mui/styles": "5.14.13", + "axios": "1.5.1", + "react": "18.2.0", + "react-dom": "18.2.0", + "uuid": "9.0.1" + }, + "devDependencies": { + "eslint-config-react-app": "7.0.1", + "react-scripts": "5.0.1" + }, + "engines": { + "node": ">=18", + "npm": ">=8" } } diff --git a/examples/cactus-example-discounted-asset-trade/package.json b/examples/cactus-example-discounted-asset-trade/package.json index 05515f59e34..64900642798 100644 --- a/examples/cactus-example-discounted-asset-trade/package.json +++ b/examples/cactus-example-discounted-asset-trade/package.json @@ -56,5 +56,9 @@ "@types/jsonwebtoken": "9.0.2", "@types/jsrsasign": "10.5.8", "@types/uuid": "9.0.6" + }, + "engines": { + "node": ">=18", + "npm": ">=8" } } diff --git a/examples/cactus-example-electricity-trade/package.json b/examples/cactus-example-electricity-trade/package.json index e54e1a232b7..4ded05beae1 100644 --- a/examples/cactus-example-electricity-trade/package.json +++ b/examples/cactus-example-electricity-trade/package.json @@ -54,5 +54,9 @@ "eslint-config-prettier": "8.10.0", "eslint-plugin-prettier": "5.0.0", "prettier": "2.8.8" + }, + "engines": { + "node": ">=18", + "npm": ">=8" } } diff --git a/examples/cactus-example-supply-chain-backend/package.json b/examples/cactus-example-supply-chain-backend/package.json index 0af01c62708..8a6d895ac8d 100644 --- a/examples/cactus-example-supply-chain-backend/package.json +++ b/examples/cactus-example-supply-chain-backend/package.json @@ -81,8 +81,8 @@ "@types/uuid": "8.3.4" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/examples/cactus-example-supply-chain-business-logic-plugin/package.json b/examples/cactus-example-supply-chain-business-logic-plugin/package.json index e1bca132bf7..773f4bd2266 100644 --- a/examples/cactus-example-supply-chain-business-logic-plugin/package.json +++ b/examples/cactus-example-supply-chain-business-logic-plugin/package.json @@ -78,8 +78,8 @@ "@types/uuid": "8.3.4" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/examples/cactus-example-supply-chain-frontend/package.json b/examples/cactus-example-supply-chain-frontend/package.json index 9a2f57a7bb8..56307a8d3b8 100644 --- a/examples/cactus-example-supply-chain-frontend/package.json +++ b/examples/cactus-example-supply-chain-frontend/package.json @@ -91,8 +91,8 @@ "tls-browserify": "0.2.2" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/examples/cactus-example-tcs-huawei/package.json b/examples/cactus-example-tcs-huawei/package.json index f9582e4686e..02e751bd838 100644 --- a/examples/cactus-example-tcs-huawei/package.json +++ b/examples/cactus-example-tcs-huawei/package.json @@ -49,5 +49,9 @@ "eslint-config-prettier": "8.10.0", "eslint-plugin-prettier": "5.0.0", "prettier": "2.8.8" + }, + "engines": { + "node": ">=18", + "npm": ">=8" } } diff --git a/examples/cactus-workshop-examples-2022-11-14/package.json b/examples/cactus-workshop-examples-2022-11-14/package.json index 9356d6a4370..e4f558f637f 100644 --- a/examples/cactus-workshop-examples-2022-11-14/package.json +++ b/examples/cactus-workshop-examples-2022-11-14/package.json @@ -66,8 +66,8 @@ "@types/uuid": "9.0.6" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/package.json b/extensions/cactus-plugin-htlc-coordinator-besu/package.json index 6d82a502f39..7a581d36be1 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/package.json +++ b/extensions/cactus-plugin-htlc-coordinator-besu/package.json @@ -86,8 +86,8 @@ "web3-utils": "4.0.3" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/extensions/cactus-plugin-object-store-ipfs/package.json b/extensions/cactus-plugin-object-store-ipfs/package.json index 75ccb7f442b..11ab114d022 100644 --- a/extensions/cactus-plugin-object-store-ipfs/package.json +++ b/extensions/cactus-plugin-object-store-ipfs/package.json @@ -77,8 +77,8 @@ "multiformats": "11.0.2" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cacti-ledger-browser/package.json b/packages/cacti-ledger-browser/package.json index 85f68b96569..7b31a51ec45 100644 --- a/packages/cacti-ledger-browser/package.json +++ b/packages/cacti-ledger-browser/package.json @@ -68,7 +68,8 @@ "vite-plugin-solid": "2.3.0" }, "engines": { - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-api-client/package.json b/packages/cactus-api-client/package.json index 86f13028e13..f5e127d9638 100644 --- a/packages/cactus-api-client/package.json +++ b/packages/cactus-api-client/package.json @@ -66,8 +66,8 @@ "lodash": "4.17.21" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-cmd-api-server/package.json b/packages/cactus-cmd-api-server/package.json index 7d4460f4732..dc8d8931716 100644 --- a/packages/cactus-cmd-api-server/package.json +++ b/packages/cactus-cmd-api-server/package.json @@ -121,8 +121,8 @@ "protobufjs": "7.2.5" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-cmd-socketio-server/package.json b/packages/cactus-cmd-socketio-server/package.json index dad7ed40252..3c83a86c78b 100644 --- a/packages/cactus-cmd-socketio-server/package.json +++ b/packages/cactus-cmd-socketio-server/package.json @@ -83,6 +83,10 @@ "lodash": "4.17.21", "ts-node": "8.9.1" }, + "engines": { + "node": ">=18", + "npm": ">=8" + }, "publishConfig": { "access": "public" } diff --git a/packages/cactus-common/package.json b/packages/cactus-common/package.json index 36b22cbe416..3e5a8b56e92 100644 --- a/packages/cactus-common/package.json +++ b/packages/cactus-common/package.json @@ -73,8 +73,8 @@ "uuid": "8.3.2" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-core-api/package.json b/packages/cactus-core-api/package.json index ea28fd82e14..af57fd4e711 100644 --- a/packages/cactus-core-api/package.json +++ b/packages/cactus-core-api/package.json @@ -77,8 +77,8 @@ "typescript-optional": "2.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-core/package.json b/packages/cactus-core/package.json index 99277ebb981..d1f0dd44e83 100644 --- a/packages/cactus-core/package.json +++ b/packages/cactus-core/package.json @@ -66,8 +66,8 @@ "uuid": "8.3.2" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-consortium-manual/package.json b/packages/cactus-plugin-consortium-manual/package.json index 64a8061e580..caaccb19af3 100644 --- a/packages/cactus-plugin-consortium-manual/package.json +++ b/packages/cactus-plugin-consortium-manual/package.json @@ -73,8 +73,8 @@ "@types/uuid": "8.3.4" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/package.json b/packages/cactus-plugin-htlc-eth-besu-erc20/package.json index 5626def91b9..282fbef5baa 100644 --- a/packages/cactus-plugin-htlc-eth-besu-erc20/package.json +++ b/packages/cactus-plugin-htlc-eth-besu-erc20/package.json @@ -74,8 +74,8 @@ "@types/express": "4.17.19" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-htlc-eth-besu/package.json b/packages/cactus-plugin-htlc-eth-besu/package.json index 277732f8196..78706d4706c 100644 --- a/packages/cactus-plugin-htlc-eth-besu/package.json +++ b/packages/cactus-plugin-htlc-eth-besu/package.json @@ -90,8 +90,8 @@ "forge-std": "https://github.com/foundry-rs/forge-std.git#66bf4e2c92cf507531599845e8d5a08cc2e3b5bb" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-keychain-aws-sm/package.json b/packages/cactus-plugin-keychain-aws-sm/package.json index 4b712c8375d..43e53a0654d 100644 --- a/packages/cactus-plugin-keychain-aws-sm/package.json +++ b/packages/cactus-plugin-keychain-aws-sm/package.json @@ -77,8 +77,8 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-keychain-azure-kv/package.json b/packages/cactus-plugin-keychain-azure-kv/package.json index 70a313b5a32..ec4fac53962 100644 --- a/packages/cactus-plugin-keychain-azure-kv/package.json +++ b/packages/cactus-plugin-keychain-azure-kv/package.json @@ -81,8 +81,8 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-keychain-google-sm/package.json b/packages/cactus-plugin-keychain-google-sm/package.json index c598b2bfac7..cfcd47e01d5 100644 --- a/packages/cactus-plugin-keychain-google-sm/package.json +++ b/packages/cactus-plugin-keychain-google-sm/package.json @@ -77,8 +77,8 @@ "openapi-types": "9.1.0" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-keychain-memory-wasm/package.json b/packages/cactus-plugin-keychain-memory-wasm/package.json index aad5198fe60..81ecc54d760 100644 --- a/packages/cactus-plugin-keychain-memory-wasm/package.json +++ b/packages/cactus-plugin-keychain-memory-wasm/package.json @@ -76,8 +76,8 @@ "del-cli": "4.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-keychain-memory/package.json b/packages/cactus-plugin-keychain-memory/package.json index 110b8ae1371..e0a3bca963f 100644 --- a/packages/cactus-plugin-keychain-memory/package.json +++ b/packages/cactus-plugin-keychain-memory/package.json @@ -69,8 +69,8 @@ "body-parser": "1.20.2" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-keychain-vault/package.json b/packages/cactus-plugin-keychain-vault/package.json index 6c4c1bfcee5..f3414182fa3 100644 --- a/packages/cactus-plugin-keychain-vault/package.json +++ b/packages/cactus-plugin-keychain-vault/package.json @@ -79,8 +79,8 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-besu/package.json b/packages/cactus-plugin-ledger-connector-besu/package.json index d3ddc523830..625e5b80eb1 100644 --- a/packages/cactus-plugin-ledger-connector-besu/package.json +++ b/packages/cactus-plugin-ledger-connector-besu/package.json @@ -89,8 +89,8 @@ "web3-eth": "1.6.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-cdl-socketio/package.json b/packages/cactus-plugin-ledger-connector-cdl-socketio/package.json index 3f4ea215e5d..5b8098d577e 100644 --- a/packages/cactus-plugin-ledger-connector-cdl-socketio/package.json +++ b/packages/cactus-plugin-ledger-connector-cdl-socketio/package.json @@ -77,8 +77,8 @@ "uuid": "8.3.2" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-corda/package.json b/packages/cactus-plugin-ledger-connector-corda/package.json index 01251e38dc8..fc6336dc1f6 100644 --- a/packages/cactus-plugin-ledger-connector-corda/package.json +++ b/packages/cactus-plugin-ledger-connector-corda/package.json @@ -81,8 +81,8 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-ethereum/package.json b/packages/cactus-plugin-ledger-connector-ethereum/package.json index 60a8e570fc7..0ddb7a781eb 100644 --- a/packages/cactus-plugin-ledger-connector-ethereum/package.json +++ b/packages/cactus-plugin-ledger-connector-ethereum/package.json @@ -52,9 +52,9 @@ "dist/*" ], "scripts": { + "build:dev:backend:postbuild": "npm run copy-artillery-config", "codegen": "run-p 'codegen:*'", "codegen:openapi": "npm run generate-sdk", - "build:dev:backend:postbuild": "npm run copy-artillery-config", "copy-artillery-config": "cp -af ./src/test/typescript/benchmark/setup/geth-benchmark-config.yaml ./src/test/typescript/benchmark/setup/artillery-helper-functions.js ./dist/lib/test/typescript/benchmark/setup", "generate-sdk": "run-p 'generate-sdk:*'", "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected", @@ -102,8 +102,8 @@ "web3-eth-accounts": "4.0.6" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-fabric/package.json b/packages/cactus-plugin-ledger-connector-fabric/package.json index 31ab6cdcf0a..7a04afe9412 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/package.json +++ b/packages/cactus-plugin-ledger-connector-fabric/package.json @@ -110,8 +110,8 @@ "ws-wallet": "1.1.5" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/package.json b/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/package.json index f6dacda2c72..53869fd7b42 100644 --- a/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/package.json +++ b/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/package.json @@ -80,8 +80,8 @@ "socket.io-client-fixed-types": "4.5.4" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-iroha/package.json b/packages/cactus-plugin-ledger-connector-iroha/package.json index 5af46ce6c30..f20f06d6567 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/package.json +++ b/packages/cactus-plugin-ledger-connector-iroha/package.json @@ -86,8 +86,8 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-iroha2/package.json b/packages/cactus-plugin-ledger-connector-iroha2/package.json index 672f57b7403..d7016c0920d 100644 --- a/packages/cactus-plugin-ledger-connector-iroha2/package.json +++ b/packages/cactus-plugin-ledger-connector-iroha2/package.json @@ -76,8 +76,8 @@ "uuid": "8.3.2" }, "engines": { - "node": ">=12", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-quorum/package.json b/packages/cactus-plugin-ledger-connector-quorum/package.json index c055b4afc26..9e449f05c9e 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/package.json +++ b/packages/cactus-plugin-ledger-connector-quorum/package.json @@ -91,8 +91,8 @@ "web3-eth": "1.6.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/package.json b/packages/cactus-plugin-ledger-connector-sawtooth/package.json index bcdfc20d47a..b00430c52aa 100644 --- a/packages/cactus-plugin-ledger-connector-sawtooth/package.json +++ b/packages/cactus-plugin-ledger-connector-sawtooth/package.json @@ -47,8 +47,8 @@ "codegen": "run-p 'codegen:*'", "codegen:openapi": "npm run generate-sdk", "generate-sdk": "run-p 'generate-sdk:*'", - "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected", "generate-sdk:sawtooth-axios": "openapi-generator-cli generate -i ./src/main/json/sawtooth-openapi.json -g typescript-axios -o ./src/main/typescript/sawtooth-api/ --reserved-words-mappings protected=protected", + "generate-sdk:typescript-axios": "openapi-generator-cli generate -i ./src/main/json/openapi.json -g typescript-axios -o ./src/main/typescript/generated/openapi/typescript-axios/ --reserved-words-mappings protected=protected", "webpack": "npm-run-all webpack:dev", "webpack:dev": "npm-run-all webpack:dev:node webpack:dev:web", "webpack:dev:node": "webpack --env=dev --target=node --config ../../webpack.config.js", @@ -73,7 +73,7 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=16", + "node": ">=18", "npm": ">=8" }, "publishConfig": { diff --git a/packages/cactus-plugin-ledger-connector-tcs-huawei-socketio/package.json b/packages/cactus-plugin-ledger-connector-tcs-huawei-socketio/package.json index 660e62e9619..0b1319026e9 100644 --- a/packages/cactus-plugin-ledger-connector-tcs-huawei-socketio/package.json +++ b/packages/cactus-plugin-ledger-connector-tcs-huawei-socketio/package.json @@ -70,8 +70,8 @@ "@types/http-errors": "2.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-ubiquity/package.json b/packages/cactus-plugin-ledger-connector-ubiquity/package.json index 693779b692d..4e136330453 100644 --- a/packages/cactus-plugin-ledger-connector-ubiquity/package.json +++ b/packages/cactus-plugin-ledger-connector-ubiquity/package.json @@ -72,8 +72,8 @@ "@types/uuid": "9.0.6" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-ledger-connector-xdai/package.json b/packages/cactus-plugin-ledger-connector-xdai/package.json index 8f8716ea020..ee349f7ab9a 100644 --- a/packages/cactus-plugin-ledger-connector-xdai/package.json +++ b/packages/cactus-plugin-ledger-connector-xdai/package.json @@ -80,8 +80,8 @@ "web3-eth": "1.6.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-odap-hermes/package.json b/packages/cactus-plugin-odap-hermes/package.json index 83c97ddae32..858bc4e20e6 100644 --- a/packages/cactus-plugin-odap-hermes/package.json +++ b/packages/cactus-plugin-odap-hermes/package.json @@ -83,8 +83,8 @@ "typescript": "4.9.5" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-persistence-ethereum/package.json b/packages/cactus-plugin-persistence-ethereum/package.json index e9e54247b01..2a91012b6ac 100644 --- a/packages/cactus-plugin-persistence-ethereum/package.json +++ b/packages/cactus-plugin-persistence-ethereum/package.json @@ -87,8 +87,8 @@ "web3-eth-accounts": "4.0.3" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-plugin-persistence-fabric/package.json b/packages/cactus-plugin-persistence-fabric/package.json index 4b5cd029926..f6546538dcc 100644 --- a/packages/cactus-plugin-persistence-fabric/package.json +++ b/packages/cactus-plugin-persistence-fabric/package.json @@ -90,8 +90,8 @@ "uuid": "8.3.2" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-api-client/package.json b/packages/cactus-test-api-client/package.json index ca30e2f5366..f7d9b3b1844 100644 --- a/packages/cactus-test-api-client/package.json +++ b/packages/cactus-test-api-client/package.json @@ -66,8 +66,8 @@ "@types/uuid": "9.0.6" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-cmd-api-server/package.json b/packages/cactus-test-cmd-api-server/package.json index 9936c2758d7..ed3978602fe 100644 --- a/packages/cactus-test-cmd-api-server/package.json +++ b/packages/cactus-test-cmd-api-server/package.json @@ -64,8 +64,8 @@ "@types/uuid": "9.0.6" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-geth-ledger/package.json b/packages/cactus-test-geth-ledger/package.json index af27802a4f3..9f7254268ff 100644 --- a/packages/cactus-test-geth-ledger/package.json +++ b/packages/cactus-test-geth-ledger/package.json @@ -62,8 +62,8 @@ "@types/dockerode": "3.2.7" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-plugin-consortium-manual/package.json b/packages/cactus-test-plugin-consortium-manual/package.json index 8016c7e84cb..d3b783e0194 100644 --- a/packages/cactus-test-plugin-consortium-manual/package.json +++ b/packages/cactus-test-plugin-consortium-manual/package.json @@ -64,8 +64,8 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/package.json b/packages/cactus-test-plugin-htlc-eth-besu-erc20/package.json index b0b860f9e10..16823c30462 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/package.json +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/package.json @@ -71,8 +71,8 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-plugin-htlc-eth-besu/package.json b/packages/cactus-test-plugin-htlc-eth-besu/package.json index 43183684352..0dd9ca60969 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/package.json +++ b/packages/cactus-test-plugin-htlc-eth-besu/package.json @@ -72,8 +72,8 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-plugin-ledger-connector-besu/package.json b/packages/cactus-test-plugin-ledger-connector-besu/package.json index e04f5a5b4bd..86261701a7a 100644 --- a/packages/cactus-test-plugin-ledger-connector-besu/package.json +++ b/packages/cactus-test-plugin-ledger-connector-besu/package.json @@ -72,8 +72,8 @@ "web3-core": "1.6.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-plugin-ledger-connector-ethereum/package.json b/packages/cactus-test-plugin-ledger-connector-ethereum/package.json index 68e6dc33573..5bc2e5a5c31 100644 --- a/packages/cactus-test-plugin-ledger-connector-ethereum/package.json +++ b/packages/cactus-test-plugin-ledger-connector-ethereum/package.json @@ -69,8 +69,8 @@ "web3": "4.1.0" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-plugin-ledger-connector-quorum/package.json b/packages/cactus-test-plugin-ledger-connector-quorum/package.json index 55fc0449e25..5b78d401905 100644 --- a/packages/cactus-test-plugin-ledger-connector-quorum/package.json +++ b/packages/cactus-test-plugin-ledger-connector-quorum/package.json @@ -71,8 +71,8 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-tooling/package.json b/packages/cactus-test-tooling/package.json index 18d776e53d5..de702f47e50 100644 --- a/packages/cactus-test-tooling/package.json +++ b/packages/cactus-test-tooling/package.json @@ -104,8 +104,8 @@ "temp": "0.9.4" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-test-verifier-client/package.json b/packages/cactus-test-verifier-client/package.json index 19caf8577b1..ca887b5cac7 100644 --- a/packages/cactus-test-verifier-client/package.json +++ b/packages/cactus-test-verifier-client/package.json @@ -60,8 +60,8 @@ "@types/node": "14.18.54" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-verifier-client/package.json b/packages/cactus-verifier-client/package.json index 8fef9ba4e82..8dafb67f66a 100644 --- a/packages/cactus-verifier-client/package.json +++ b/packages/cactus-verifier-client/package.json @@ -57,8 +57,8 @@ "rxjs": "7.8.1" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/tools/bump-package-engines.ts b/tools/bump-package-engines.ts new file mode 100755 index 00000000000..6531e79a81e --- /dev/null +++ b/tools/bump-package-engines.ts @@ -0,0 +1,101 @@ +#!/usr/bin/env node + +/** + * Bump minimal nodejs and npm version in all cacti packages. + * Will add engines entry if one is missing at the moment. + * How to run: + * TS_NODE_PROJECT=tools/tsconfig.json node --experimental-json-modules --trace-deprecation --experimental-modules --abort-on-uncaught-exception --loader ts-node/esm --experimental-specifier-resolution=node ./tools/bump-package-engines.ts + */ + +import fs from "fs-extra"; +import path from "path"; +import { fileURLToPath } from "url"; +import { globby, Options as GlobbyOptions } from "globby"; +import yargs from "yargs"; +import { hideBin } from "yargs/helpers"; +import { sortPackageJson } from "sort-package-json"; +import lernaCfg from "../lerna.json" assert { type: "json" }; + +// Constants +const NODE_PATH = path.resolve(process.argv[1]); +const __FILENAME = path.resolve(fileURLToPath(import.meta.url)); +const __DIRNAME = path.dirname(__FILENAME); +const IS_RUN_AS_SCRIPT = NODE_PATH === __FILENAME; +const SCRIPT_DIR = __DIRNAME; +const PROJECT_DIR = path.join(SCRIPT_DIR, "../"); +const GLOBBY_OPTIONS: GlobbyOptions = { + cwd: PROJECT_DIR, + ignore: ["**/node_modules"], +}; + +/** + * Update required engines of single package.json file. + * Will also sort the file if needed. + */ +async function updateJsonEngines( + packageJson: { + engines?: { + node?: string; + npm?: string; + }; + }, + nodeVersion: string, + npmVersion: string, +) { + const engines = packageJson.engines ?? {}; + engines.node = `>=${nodeVersion}`; + engines.npm = `>=${npmVersion}`; + packageJson.engines = engines; + return sortPackageJson(packageJson); +} + +/** + * Updates minimal nodeJS and npm versions in all package json files. + */ +export async function bumpPackageEngines( + nodeVersion: string, + npmVersion: string, +): Promise { + const TAG = "[tools/bump-package-engines]"; + console.log(`${TAG} SCRIPT_DIR=${SCRIPT_DIR}`); + console.log(`${TAG} PROJECT_DIR=${PROJECT_DIR}`); + + const includeGlobs = lernaCfg.packages.map((x) => x.concat("/package.json")); + + const pkgJsonPaths = await globby(includeGlobs, GLOBBY_OPTIONS); + for (const pkg of pkgJsonPaths) { + console.log(`Process ${pkg}...`); + const json = await fs.readJSON(pkg); + const patchedJson = await updateJsonEngines(json, nodeVersion, npmVersion); + const patchedJsonString = JSON.stringify(patchedJson, null, 2).concat("\n"); + fs.writeFile(pkg, patchedJsonString); + } +} + +/** + * Main logic of the script + * @param argv script arguments array + */ +async function main(argv: string[]) { + const parsedArgv = await yargs(hideBin(argv)) + .version(false) + .env("CACTI_") + .option("node", { + type: "string", + description: "New minimal NodeJS engine version. ", + }) + .option("npm", { + type: "string", + description: "New minimal NPM engine version. ", + }) + .demandOption( + ["node", "npm"], + "New versions nodejs and npm versions must be provided", + ).argv; + + await bumpPackageEngines(parsedArgv.node, parsedArgv.npm); +} + +if (IS_RUN_AS_SCRIPT) { + main(process.argv); +} diff --git a/weaver/common/protos-js/package.json b/weaver/common/protos-js/package.json index 9211433cc75..f289722d618 100644 --- a/weaver/common/protos-js/package.json +++ b/weaver/common/protos-js/package.json @@ -46,6 +46,10 @@ "devDependencies": { "grpc_tools_node_protoc_ts": "5.3.3" }, + "engines": { + "node": ">=18", + "npm": ">=8" + }, "publishConfig": { "registry": "https://npm.pkg.github.com/hyperledger" }, diff --git a/weaver/core/drivers/fabric-driver/package.json b/weaver/core/drivers/fabric-driver/package.json index 1988f2920a2..d21da33a033 100644 --- a/weaver/core/drivers/fabric-driver/package.json +++ b/weaver/core/drivers/fabric-driver/package.json @@ -41,5 +41,9 @@ "patch-package": "6.5.1", "typedoc": "0.24.8", "typescript": "4.9.5" + }, + "engines": { + "node": ">=18", + "npm": ">=8" } } diff --git a/weaver/core/identity-management/iin-agent/package.json b/weaver/core/identity-management/iin-agent/package.json index 24e0d74c05a..1a9f4f27acb 100644 --- a/weaver/core/identity-management/iin-agent/package.json +++ b/weaver/core/identity-management/iin-agent/package.json @@ -51,5 +51,9 @@ "ts-node": "10.9.1", "typedoc": "0.24.8", "typescript": "4.9.5" + }, + "engines": { + "node": ">=18", + "npm": ">=8" } } diff --git a/weaver/samples/besu/besu-cli/package.json b/weaver/samples/besu/besu-cli/package.json index 261c2c799fc..952e2469180 100644 --- a/weaver/samples/besu/besu-cli/package.json +++ b/weaver/samples/besu/besu-cli/package.json @@ -56,5 +56,9 @@ "tslint-config-prettier": "1.18.0", "tslint-config-standard": "8.0.1", "typescript": "4.9.5" + }, + "engines": { + "node": ">=18", + "npm": ">=8" } } diff --git a/weaver/samples/besu/simpleasset/package.json b/weaver/samples/besu/simpleasset/package.json index de3657634e5..bf837926699 100644 --- a/weaver/samples/besu/simpleasset/package.json +++ b/weaver/samples/besu/simpleasset/package.json @@ -41,5 +41,9 @@ "devDependencies": { "truffle": "5.11.2", "typescript": "4.9.5" + }, + "engines": { + "node": ">=18", + "npm": ">=8" } } diff --git a/weaver/samples/besu/simplestate/package.json b/weaver/samples/besu/simplestate/package.json index c94d06e0d0e..804c4a29f23 100644 --- a/weaver/samples/besu/simplestate/package.json +++ b/weaver/samples/besu/simplestate/package.json @@ -40,5 +40,9 @@ }, "devDependencies": { "truffle": "5.11.2" + }, + "engines": { + "node": ">=18", + "npm": ">=8" } } diff --git a/weaver/samples/fabric/fabric-cli/package.json b/weaver/samples/fabric/fabric-cli/package.json index 8322de602ef..2cfb55a2d60 100644 --- a/weaver/samples/fabric/fabric-cli/package.json +++ b/weaver/samples/fabric/fabric-cli/package.json @@ -79,6 +79,10 @@ "ts-node": "10.9.1", "typescript": "4.9.5" }, + "engines": { + "node": ">=18", + "npm": ">=8" + }, "publishConfig": { "registry": "https://npm.pkg.github.com/hyperledger-labs" } diff --git a/weaver/sdks/besu/node/package.json b/weaver/sdks/besu/node/package.json index b6290244bdd..d0bcf1fb4d8 100644 --- a/weaver/sdks/besu/node/package.json +++ b/weaver/sdks/besu/node/package.json @@ -41,6 +41,10 @@ "typedoc": "0.24.8", "typescript": "4.9.5" }, + "engines": { + "node": ">=18", + "npm": ">=8" + }, "publishConfig": { "registry": "https://npm.pkg.github.com/hyperledger" }, diff --git a/weaver/sdks/fabric/interoperation-node-sdk/package.json b/weaver/sdks/fabric/interoperation-node-sdk/package.json index 7582a4d4b58..b49c54121bc 100644 --- a/weaver/sdks/fabric/interoperation-node-sdk/package.json +++ b/weaver/sdks/fabric/interoperation-node-sdk/package.json @@ -76,8 +76,8 @@ "typescript": "4.9.5" }, "engines": { - "node": ">=10.15.3 <=16.17.1", - "npm": ">=6.0.0 <=8.15.0" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "registry": "https://npm.pkg.github.com/hyperledger"