diff --git a/.github/workflows/.dast-nuclei-cmd-api-server.yaml b/.github/workflows/.dast-nuclei-cmd-api-server.yaml index cc33771fff..6f1f0d3ff6 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 291242928a..3624acf3d9 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 64ce393275..521f520e2b 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 908ddcba9f..221428f3e6 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 57edef0ae5..bc89547012 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 6ecb918577..68f9d046ca 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 1bc5737355..9e8a8b704b 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 d7c083c860..937359ef95 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 f476251820..0564780594 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 7b6ed3ea62..9d3fa10069 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 7c00c78c5a..7bf92f27da 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 35e1044f0f..32f88f26c0 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 90faa24ea0..c6664d3c40 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 45e8e8182e..31ff946918 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 02fd8214aa..ed99a7713d 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 8cacd1e81a..179c2f5639 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 8a4056de1e..552a363ed7 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-backend/src/main/typescript/carbon-accounting-app.ts b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app.ts index 18f76639fb..d720ec77c4 100644 --- a/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app.ts +++ b/examples/cactus-example-carbon-accounting-backend/src/main/typescript/carbon-accounting-app.ts @@ -126,7 +126,7 @@ export class CarbonAccountingApp { } const addressInfo = httpApi.address() as AddressInfo; - const nodeApiHost = `http://localhost:${addressInfo.port}`; + const nodeApiHost = `http://127.0.0.1:${addressInfo.port}`; const config = new Configuration({ basePath: nodeApiHost }); 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 defcbe2d30..7fe54030ad 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 7b2d14555d..cccf6dc091 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 4542148873..13343c8a87 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-backend/src/test/typescript/cucumber/besu-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts index dfc71ded39..4ae10f035a 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/besu-helper.ts @@ -12,7 +12,7 @@ export async function lockBesuAssetReference( assetRefID: string, ): Promise { await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "SEND", @@ -31,7 +31,7 @@ export async function lockBesuAssetReference( export async function getBesuBalance(address: string): Promise { const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_CBDC_ERC20_NAME, invocationType: "CALL", @@ -54,7 +54,7 @@ export async function isBesuAssetReference( assetRefID: string, ): Promise { const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "CALL", @@ -75,7 +75,7 @@ export async function isBesuAssetReference( export async function resetBesu(): Promise { await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_CBDC_ERC20_NAME, invocationType: "SEND", @@ -98,7 +98,7 @@ export async function resetBesu(): Promise { ); await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "SEND", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts index 64b768f5d1..4188182bfc 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/fabric-helper.ts @@ -8,7 +8,7 @@ const FABRIC_CONTRACT_ASSET_REF_NAME = "asset-reference-contract"; export async function getFabricBalance(identity: string): Promise { const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -29,7 +29,7 @@ export async function readFabricAssetReference( assetRefID: string, ): Promise { const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -50,7 +50,7 @@ export async function fabricAssetReferenceExists( assetRefID: string, ): Promise { const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -72,7 +72,7 @@ export async function lockFabricAssetReference( assetRefID: string, ): Promise { return axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -92,7 +92,7 @@ export async function deleteFabricAssetReference( assetRefID: string, ): Promise { return axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -113,7 +113,7 @@ export async function refundFabricTokens( finalUserEthAddress: string, ): Promise { return axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -130,7 +130,7 @@ export async function refundFabricTokens( export async function resetFabric(): Promise { await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -145,7 +145,7 @@ export async function resetFabric(): Promise { ); await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts index 18d0744682..64f4270c15 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts @@ -27,7 +27,7 @@ Given( "{string} with {int} CBDC available in the sidechain smart contract", async function (user: string, amount: number) { await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "SEND", @@ -49,7 +49,7 @@ When( "{string} escrows {int} CBDC and creates an asset reference with id {string} in the sidechain", async function (user: string, amount: number, assetRefID: string) { await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_CBDC_ERC20_NAME, invocationType: "SEND", @@ -82,7 +82,7 @@ When( "bob deletes the asset reference with id {string} in the sidechain", async function (assetRefID: string) { await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "SEND", @@ -125,7 +125,7 @@ Then( "the asset reference with id {string} is locked in the sidechain", async function (assetRefID: string) { const response = await axios.post( - "http://localhost:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", + "http://127.0.0.1:4100/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-besu/invoke-contract", { contractName: BESU_CONTRACT_ASSET_REF_NAME, invocationType: "CALL", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts index f2466348d0..e4b253fd26 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-back.steps.ts @@ -30,13 +30,13 @@ Then( }; const response = await axios.post( - "http://localhost:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", { clientGatewayConfiguration: { - apiHost: `http://localhost:4100`, + apiHost: `http://127.0.0.1:4100`, }, serverGatewayConfiguration: { - apiHost: `http://localhost:4000`, + apiHost: `http://127.0.0.1:4000`, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -92,13 +92,13 @@ Then( await axios .post( - "http://localhost:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", { clientGatewayConfiguration: { - apiHost: `http://localhost:4100`, + apiHost: `http://127.0.0.1:4100`, }, serverGatewayConfiguration: { - apiHost: `http://localhost:4000`, + apiHost: `http://127.0.0.1:4000`, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts index 393e5a7252..3ed80385af 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/bridge-out.steps.ts @@ -14,7 +14,7 @@ Then( "the bridged out amount in the chaincode is {int} CBDC", async function (amount: string) { const response = await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -55,13 +55,13 @@ When( }; const response = await axios.post( - "http://localhost:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", { clientGatewayConfiguration: { - apiHost: `http://localhost:4000`, + apiHost: `http://127.0.0.1:4000`, }, serverGatewayConfiguration: { - apiHost: `http://localhost:4100`, + apiHost: `http://127.0.0.1:4100`, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -118,13 +118,13 @@ Then( await axios .post( - "http://localhost:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", { clientGatewayConfiguration: { - apiHost: `http://localhost:4000`, + apiHost: `http://127.0.0.1:4000`, }, serverGatewayConfiguration: { - apiHost: `http://localhost:4100`, + apiHost: `http://127.0.0.1:4100`, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts index 9fe3afd5db..c69af0e57b 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/fabric-gateway.steps.ts @@ -29,7 +29,7 @@ Given( "{string} with {int} CBDC available in the source chain", async function (user: string, amount: number) { await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -51,7 +51,7 @@ When( "{string} escrows {int} CBDC and creates an asset reference with id {string} in the source chain", async function (user: string, amount: number, assetRefID: string) { await axios.post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -98,7 +98,7 @@ Then( async function (user: string, assetRefID: string) { return axios .post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_ASSET_REF_NAME, channelName: FABRIC_CHANNEL_NAME, @@ -126,7 +126,7 @@ Then( axios .post( - "http://localhost:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", + "http://127.0.0.1:4000/api/v1/plugins/@hyperledger/cactus-plugin-ledger-connector-fabric/run-transaction", { contractName: FABRIC_CONTRACT_CBDC_ERC20_NAME, channelName: FABRIC_CHANNEL_NAME, diff --git a/examples/cactus-example-cbdc-bridging-frontend/package.json b/examples/cactus-example-cbdc-bridging-frontend/package.json index 7da1c9723e..a4479bd320 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/package.json +++ b/examples/cactus-example-cbdc-bridging-frontend/package.json @@ -23,10 +23,10 @@ "web-vitals": "^2.1.4" }, "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": { "extends": [ diff --git a/examples/cactus-example-discounted-asset-trade/package.json b/examples/cactus-example-discounted-asset-trade/package.json index a2aa4bbca6..0600085a98 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 d1059a81a5..7403d94bc4 100644 --- a/examples/cactus-example-electricity-trade/package.json +++ b/examples/cactus-example-electricity-trade/package.json @@ -53,5 +53,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 700b277e87..8c96b4aa58 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-backend/src/main/typescript/supply-chain-app.ts b/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app.ts index 5b98669647..363e17d810 100644 --- a/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app.ts +++ b/examples/cactus-example-supply-chain-backend/src/main/typescript/supply-chain-app.ts @@ -224,13 +224,13 @@ export class SupplyChainApp { const httpGuiC = await Servers.startOnPort(3200, "0.0.0.0"); const addressInfoA = httpApiA.address() as AddressInfo; - const nodeApiHostA = `http://localhost:${addressInfoA.port}`; + const nodeApiHostA = `http://127.0.0.1:${addressInfoA.port}`; const addressInfoB = httpApiB.address() as AddressInfo; - const nodeApiHostB = `http://localhost:${addressInfoB.port}`; + const nodeApiHostB = `http://127.0.0.1:${addressInfoB.port}`; const addressInfoC = httpApiC.address() as AddressInfo; - const nodeApiHostC = `http://localhost:${addressInfoC.port}`; + const nodeApiHostC = `http://127.0.0.1:${addressInfoC.port}`; const token = await this.getOrCreateToken(); const baseOptions = { headers: { Authorization: `Bearer ${token}` } }; @@ -464,7 +464,7 @@ export class SupplyChainApp { const memberIdA = uuidv4(); const nodeIdA = uuidv4(); const addressInfoA = serverA.address() as AddressInfo; - const nodeApiHostA = `http://localhost:${addressInfoA.port}`; + const nodeApiHostA = `http://127.0.0.1:${addressInfoA.port}`; const publickKeyPemA = await exportSPKI(keyPairA); const cactusNodeA: CactusNode = { @@ -492,7 +492,7 @@ export class SupplyChainApp { const memberIdB = uuidv4(); const nodeIdB = uuidv4(); const addressInfoB = serverB.address() as AddressInfo; - const nodeApiHostB = `http://localhost:${addressInfoB.port}`; + const nodeApiHostB = `http://127.0.0.1:${addressInfoB.port}`; const publickKeyPemB = await exportSPKI(keyPairB); const cactusNodeB: CactusNode = { @@ -521,7 +521,7 @@ export class SupplyChainApp { const memberIdC = uuidv4(); const nodeIdC = uuidv4(); const addressInfoC = serverC.address() as AddressInfo; - const nodeApiHostC = `http://localhost:${addressInfoC.port}`; + const nodeApiHostC = `http://127.0.0.1:${addressInfoC.port}`; const publickKeyPemC = await exportSPKI(keyPairC); const cactusNodeC: CactusNode = { 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 7ff79f1ca0..c103a3d299 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 b05941f848..db466546a2 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 f9582e4686..02e751bd83 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 9356d6a437..e4f558f637 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 7e892ac37d..8613080dfb 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-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts index f4d34f0c0c..d57d6b7f15 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/counterparty-htlc-endpoint.test.ts @@ -143,7 +143,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts index 818f9a7bf7..417c89b208 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/own-htlc-endpoint.test.ts @@ -142,7 +142,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: server, }; diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts index adc8e4b86e..7343633d06 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/refund.test.ts @@ -147,7 +147,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts index c49cdc1b84..db77265eec 100644 --- a/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts +++ b/extensions/cactus-plugin-htlc-coordinator-besu/src/test/typescript/integration/plugin-htlc-coordinator/withdraw-counterparty-endpoint.test.ts @@ -149,7 +149,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/extensions/cactus-plugin-object-store-ipfs/package.json b/extensions/cactus-plugin-object-store-ipfs/package.json index 08054bc86c..4e24d18bdf 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/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/kubo-rpc-client-types.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/kubo-rpc-client-types.ts index d01df0fc5c..d35e8468cd 100644 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/kubo-rpc-client-types.ts +++ b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/kubo-rpc-client-types.ts @@ -3,15 +3,19 @@ * To fix this we define required types here, based on their counterparts in kubo-rpc-client. */ -// @ts-ignore +// TODO: Remove after migration to ESM or if better workaround was found. +// @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. import type { Multiaddr } from "@multiformats/multiaddr"; -// @ts-ignore +// TODO: Remove after migration to ESM or if better workaround was found. +// @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. import type { MultihashHasher } from "multiformats/hashes/interface"; import type { Agent as HttpAgent } from "http"; import type { Agent as HttpsAgent } from "https"; -// @ts-ignore +// TODO: Remove after migration to ESM or if better workaround was found. +// @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. import type { CID } from "multiformats/cid"; -// @ts-ignore +// TODO: Remove after migration to ESM or if better workaround was found. +// @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. import type { Mtime } from "ipfs-unixfs"; ///////////////////////////////////// @@ -20,12 +24,14 @@ import type { Mtime } from "ipfs-unixfs"; // Some are simplified when details are not needed export type MultibaseCodec = -// @ts-ignore -import("multiformats/bases/interface").MultibaseCodec; + // TODO: Remove after migration to ESM or if better workaround was found. + // @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. + import("multiformats/bases/interface").MultibaseCodec; export type BlockCodec< -T1 = any, -T2 = any, -// @ts-ignore + T1 = any, + T2 = any, + // TODO: Remove after migration to ESM or if better workaround was found. + // @ts-expect-error Importing ESM from CJS module causes error, but works fine in practice since we only import the types. > = import("multiformats/codecs/interface").BlockCodec; export interface LoadBaseFn { diff --git a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts index 3e96dd5351..62320bb92a 100644 --- a/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts +++ b/extensions/cactus-plugin-object-store-ipfs/src/main/typescript/plugin-object-store-ipfs.ts @@ -1,6 +1,5 @@ import path from "path"; import type { Express } from "express"; -// @ts-ignore import { RuntimeError } from "run-time-error-cjs"; import { Logger, diff --git a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts index 67a65ddaac..bc8f322506 100644 --- a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts +++ b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/integration/plugin-object-store-ipfs.test.ts @@ -42,7 +42,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -60,7 +60,6 @@ test(testCase, async (t: Test) => { t.comment(`Go IPFS Test Container API URL: ${ipfsApiUrl}`); t.comment(`Go IPFS Test Container Gateway URL: ${ipfsGatewayUrl}`); - const { create } = await import("kubo-rpc-client"); const ipfsClientOrOptions = create({ diff --git a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts index 9203f376bb..b67e82c8b1 100644 --- a/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts +++ b/extensions/cactus-plugin-object-store-ipfs/src/test/typescript/unit/plugin-object-store-ipfs.test.ts @@ -61,7 +61,7 @@ test("PluginObjectStoreIpfs", async (t1: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cacti-ledger-browser/package.json b/packages/cacti-ledger-browser/package.json index 85f68b9656..7b31a51ec4 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 86f13028e1..f5e127d963 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-api-client/src/main/typescript/socketio-api-client.ts b/packages/cactus-api-client/src/main/typescript/socketio-api-client.ts index d998771719..d098789bb2 100644 --- a/packages/cactus-api-client/src/main/typescript/socketio-api-client.ts +++ b/packages/cactus-api-client/src/main/typescript/socketio-api-client.ts @@ -16,7 +16,12 @@ import { } from "@hyperledger/cactus-common"; import { ISocketApiClient } from "@hyperledger/cactus-core-api"; -import { Socket, SocketOptions, ManagerOptions, io } from "socket.io-client-fixed-types"; +import { + Socket, + SocketOptions, + ManagerOptions, + io, +} from "socket.io-client-fixed-types"; import { readFileSync } from "fs"; import { resolve as resolvePath } from "path"; import { diff --git a/packages/cactus-cmd-api-server/package.json b/packages/cactus-cmd-api-server/package.json index 7541c330a0..1e925cb723 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-api-server/src/main/typescript/config/config-service.ts b/packages/cactus-cmd-api-server/src/main/typescript/config/config-service.ts index 45c39b79fb..cf9fc77e8b 100644 --- a/packages/cactus-cmd-api-server/src/main/typescript/config/config-service.ts +++ b/packages/cactus-cmd-api-server/src/main/typescript/config/config-service.ts @@ -511,7 +511,7 @@ export class ConfigService { const cockpitPort = (schema.cockpitPort as SchemaObj).default; const pkiGenerator = new SelfSignedPkiGenerator(); - const pkiServer: IPki = pkiGenerator.create("localhost"); + const pkiServer: IPki = pkiGenerator.create("127.0.0.1"); const plugins: PluginImport[] = [ { diff --git a/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts index f8a6a69856..f8178adfb6 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts @@ -58,7 +58,7 @@ test("NodeJS API server + Rust plugin work together", async (t: Test) => { t.comment(`CactusKeychainVaultServer (Port=${hostPort}) started OK`); const configuration = new Configuration({ - basePath: `http://localhost:${hostPort}`, + basePath: `http://127.0.0.1:${hostPort}`, }); const apiClient = new DefaultApi(configuration); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts index d1b77e9cb1..9b0734def8 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/certificates-work-for-mutual-tls.test.ts @@ -25,7 +25,7 @@ test("works with HTTPS NodeJS module", async (t: Test) => { const generator = new SelfSignedPkiGenerator(); t.ok(generator, "Instantiated SelfSignedCertificateGenerator OK."); - const serverCert: IPki = generator.create("localhost"); + const serverCert: IPki = generator.create("127.0.0.1"); t.ok(serverCert, "serverCert truthy"); t.ok(serverCert.certificatePem, "serverCert.certificatePem truthy"); t.ok(serverCert.privateKeyPem, "serverCert.privateKeyPem truthy"); @@ -33,7 +33,7 @@ test("works with HTTPS NodeJS module", async (t: Test) => { t.ok(serverCert.keyPair, "serverCert.keyPair truthy"); // make sure the client cert has a different common name otherwise they collide and everything breaks in this test - const clientCert: IPki = generator.create("client.localhost", serverCert); + const clientCert: IPki = generator.create("client.127.0.0.1", serverCert); t.ok(clientCert, "clientCert truthy"); t.ok(clientCert.certificatePem, "clientCert.certificatePem truthy"); t.ok(clientCert.privateKeyPem, "clientCert.privateKeyPem truthy"); @@ -81,7 +81,7 @@ test("works with HTTPS NodeJS module", async (t: Test) => { aServer.once("tlsClientError", (err: Error) => reject(err)); aServer.once("listening", () => resolve(aServer)); - aServer.listen(0, "localhost"); + aServer.listen(0, "127.0.0.1"); test.onFinish(() => aServer.close()); }); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts index 24eca432bc..0e303f6352 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/config/self-signed-certificate-generator/generates-working-certificates.test.ts @@ -17,7 +17,7 @@ tap.test("works with HTTPS NodeJS module", async (assert: any) => { const generator = new SelfSignedPkiGenerator(); assert.ok(generator, "Instantiated SelfSignedCertificateGenerator OK."); - const serverCertData: IPki = generator.create("localhost"); + const serverCertData: IPki = generator.create("127.0.0.1"); assert.ok(serverCertData, "Returned cert data truthy"); assert.ok(serverCertData.certificatePem, "certData.certificatePem truthy"); assert.ok(serverCertData.privateKeyPem, "certData.privateKeyPem truthy"); @@ -42,7 +42,7 @@ tap.test("works with HTTPS NodeJS module", async (assert: any) => { reject(err); }); aServer.once("listening", () => resolve(aServer)); - aServer.listen(0, "localhost"); + aServer.listen(0, "127.0.0.1"); assert.tearDown(() => aServer.close()); }); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts index f2848b926b..24a94e473d 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/get-open-api-spec-v1-endpoint.test.ts @@ -141,14 +141,14 @@ describe("cmd-api-server:getOpenApiSpecV1Endpoint", () => { ); const res1Promise = new Promise((resolve, reject) => { - server.bindAsync("localhost:0", serverInsecureCreds, (err, port) => { + server.bindAsync("127.0.0.1:0", serverInsecureCreds, (err, port) => { if (err) { reject(err); } else { server.start(); const client = new grpc.Client( - `localhost:${port}`, + `127.0.0.1:${port}`, clientInsecureCreds, ); @@ -199,7 +199,7 @@ describe("cmd-api-server:getOpenApiSpecV1Endpoint", () => { ); const res1Promise = new Promise((resolve, reject) => { - server.bindAsync("localhost:0", serverInsecureCreds, (err, port) => { + server.bindAsync("127.0.0.1:0", serverInsecureCreds, (err, port) => { if (err) { reject(err); } else { @@ -207,7 +207,7 @@ describe("cmd-api-server:getOpenApiSpecV1Endpoint", () => { const client = new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - `localhost:${port}`, + `127.0.0.1:${port}`, clientInsecureCreds, ); client.makeUnaryRequest( @@ -257,10 +257,10 @@ describe("cmd-api-server:getOpenApiSpecV1Endpoint", () => { ); const res1Promise = new Promise((resolve, reject) => { - server.bindAsync("localhost:0", serverInsecureCreds, (err, port) => { + server.bindAsync("127.0.0.1:0", serverInsecureCreds, (err, port) => { const client = new default_service.org.hyperledger.cactus.cmd_api_server.DefaultServiceClient( - `localhost:${port}`, + `127.0.0.1:${port}`, clientInsecureCreds, ); if (err) { diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts index 456d5554bf..7e3a96da8d 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/grpc-proto-gen-ts-client-m-tls-enabled.test.ts @@ -19,8 +19,8 @@ test(testCase, async (t: Test) => { const generator = new SelfSignedPkiGenerator(); t.ok(generator, "Instantiated SelfSignedCertificateGenerator OK."); - const serverCert = generator.create("localhost"); - const clientCert = generator.create("client.localhost", serverCert); + const serverCert = generator.create("127.0.0.1"); + const clientCert = generator.create("client.127.0.0.1", serverCert); const serverRootCertPemBuf = Buffer.from(serverCert.certificatePem); const configService = new ConfigService(); diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts index edc526d55d..78e71ef5d1 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts @@ -62,7 +62,7 @@ test.skip("can import plugins at runtime (CLI)", async (t: Test) => { options: { instanceId: uuidv4(), logLevel, - rpcApiHttpHost: "localhost:8545", + rpcApiHttpHost: "127.0.0.1:8545", }, }, ]; diff --git a/packages/cactus-cmd-api-server/tsconfig.json b/packages/cactus-cmd-api-server/tsconfig.json index 58fc8e3360..e4a6c508f7 100644 --- a/packages/cactus-cmd-api-server/tsconfig.json +++ b/packages/cactus-cmd-api-server/tsconfig.json @@ -6,6 +6,7 @@ "declarationDir": "dist/lib", "rootDir": "./src", "skipLibCheck": true, + "resolveJsonModule": true, "tsBuildInfoFile": "../../.build-cache/cactus-cmd-api-server.tsbuildinfo" }, "include": [ diff --git a/packages/cactus-cmd-socketio-server/package.json b/packages/cactus-cmd-socketio-server/package.json index dad7ed4025..3c83a86c78 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-cmd-socketio-server/src/test/typescript/unit/validator-registry.test.ts b/packages/cactus-cmd-socketio-server/src/test/typescript/unit/validator-registry.test.ts index db14982be3..809483af18 100644 --- a/packages/cactus-cmd-socketio-server/src/test/typescript/unit/validator-registry.test.ts +++ b/packages/cactus-cmd-socketio-server/src/test/typescript/unit/validator-registry.test.ts @@ -25,7 +25,7 @@ test("ValidatorRegistry constructor parses required fields", () => { const mockLedgerPluginInfo = { validatorID: "abc123", validatorType: "socketio", - validatorURL: "https://localhost:1234", + validatorURL: "https://127.0.0.1:1234", validatorKeyPath: "./path/to/validator/key.crt", ledgerInfo: { ledgerAbstract: "Test ledger input", @@ -56,15 +56,15 @@ test("ValidatorRegistry constructor parses required fields", () => { peers: [ { name: "peer.test.com", - requests: "grpc://localhost/1234", + requests: "grpc://127.0.0.1/1234", }, ], orderer: { - URL: "grpc://localhost/1234", + URL: "grpc://127.0.0.1/1234", }, ca: { name: "myca.test.com", - URL: "http://localhost/1234", + URL: "http://127.0.0.1/1234", }, submitter: { name: "admin", diff --git a/packages/cactus-common/package.json b/packages/cactus-common/package.json index 36b22cbe41..3e5a8b56e9 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-common/src/test/typescript/unit/servers.test.ts b/packages/cactus-common/src/test/typescript/unit/servers.test.ts index 07cfe3e990..9147a8f4cf 100644 --- a/packages/cactus-common/src/test/typescript/unit/servers.test.ts +++ b/packages/cactus-common/src/test/typescript/unit/servers.test.ts @@ -29,7 +29,7 @@ describe(testCase, () => { { await expect( Servers.listen({ - hostname: "localhost", + hostname: "127.0.0.1", port: false as unknown as number, server, }), @@ -38,12 +38,12 @@ describe(testCase, () => { { await expect( - Servers.listen({ hostname: "localhost", port: 0, server }), + Servers.listen({ hostname: "127.0.0.1", port: 0, server }), ).toResolve(); } const prefPort = 4123; - const host = "localhost"; + const host = "127.0.0.1"; const listenOptionsBlocker = { server: portBlocker, diff --git a/packages/cactus-core-api/package.json b/packages/cactus-core-api/package.json index d0c45ba213..88f585712e 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 99277ebb98..d1f0dd44e8 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 b153a040cd..a390919712 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-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts b/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts index ea558ed2ea..070daf304a 100644 --- a/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts +++ b/packages/cactus-plugin-consortium-manual/src/test/typescript/unit/consortium/get-node-jws-endpoint-v1.test.ts @@ -32,7 +32,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-htlc-eth-besu-erc20/package.json b/packages/cactus-plugin-htlc-eth-besu-erc20/package.json index 5cd84c799b..73f1ca3d52 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 5cc499011c..04d5cad101 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 2b5b1eb266..91f162e940 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-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts index 484caf3a49..a7ce4c4028 100644 --- a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -88,7 +88,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts index 39715cbfb0..edd4b43ddd 100644 --- a/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts +++ b/packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts @@ -85,7 +85,7 @@ test("get,set,has,delete alters state as expected", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-azure-kv/package.json b/packages/cactus-plugin-keychain-azure-kv/package.json index 6cf77ef8ee..d36e6cb5c0 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 bbc5f577ec..cb45324ddb 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-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts index f68aad980e..0088f95045 100644 --- a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -45,7 +45,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts index b42b58eb78..49a5f7b38a 100644 --- a/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts +++ b/packages/cactus-plugin-keychain-google-sm/src/test/typescript/integration/plugin-keychain-google-sm.test.ts @@ -40,7 +40,7 @@ test("get,set,has,delete alters state as expected", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-memory-wasm/package.json b/packages/cactus-plugin-keychain-memory-wasm/package.json index 1e78bdb6b9..b60e973c68 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-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts index 1ce9ac9760..6bcbc788e2 100644 --- a/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts +++ b/packages/cactus-plugin-keychain-memory-wasm/src/test/typescript/unit/plugin-keychain-memory-wasm.test.ts @@ -87,7 +87,7 @@ test("PluginKeychainMemory", (t1: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-memory/package.json b/packages/cactus-plugin-keychain-memory/package.json index 127c0022db..ff555c4a6a 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 7c12a0a270..14a45bcf84 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-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts index fdc15077ad..287c5561ea 100644 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts +++ b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/cactus-keychain-vault-server.test.ts @@ -46,7 +46,7 @@ test("NodeJS API client + Rust plugin works together", async (tMain: Test) => { tMain.comment(`CactusKeychainVaultServer (Port=${hostPort}) started OK`); const configuration = new Configuration({ - basePath: `http://localhost:${hostPort}`, + basePath: `http://127.0.0.1:${hostPort}`, }); const apiClient = new DefaultApi(configuration); diff --git a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts index fff004fcb8..55174f1250 100644 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -68,7 +68,7 @@ test(`${testCase}`, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts index 681f3281ca..ba5d3cc921 100644 --- a/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts +++ b/packages/cactus-plugin-keychain-vault/src/test/typescript/integration/plugin-keychain-vault.test.ts @@ -65,7 +65,7 @@ test("get,set,has,delete alters state", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -205,7 +205,7 @@ test("API client get,set,has,delete alters state", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-besu/package.json b/packages/cactus-plugin-ledger-connector-besu/package.json index 0e1492d65a..11e461ad2a 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-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts index b5ebc7edbb..0505bfdc6d 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/deploy-contract-from-json.test.ts @@ -106,7 +106,7 @@ test(testCase, async (t: Test) => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts index a9244d3ab5..b623f769ca 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/get-record-locator.test.ts @@ -102,7 +102,7 @@ test(testCase, async (t: Test) => { path: Constants.SocketIoConnectionPathV1, }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts index 05700f8fe3..2e5bbbfb95 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-deploy-contract-from-json.test.ts @@ -109,7 +109,7 @@ test(testCase, async (t: Test) => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts index d2f62b8fc4..b7126d7f51 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/integration/plugin-ledger-connector-besu/deploy-contract/v21-get-record-locator.test.ts @@ -104,7 +104,7 @@ test(testCase, async (t: Test) => { path: Constants.SocketIoConnectionPathV1, }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts index 69a745a6d8..c7b258e916 100644 --- a/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts +++ b/packages/cactus-plugin-ledger-connector-besu/src/test/typescript/unit/get-open-api-spec-v1-connector-besu.test.ts @@ -60,7 +60,7 @@ describe(__filename, () => { await connector.registerWebServices(expressApp, wsApi); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-cdl-socketio/package.json b/packages/cactus-plugin-ledger-connector-cdl-socketio/package.json index 8f7c1a1146..cc6a9f798b 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-cdl-socketio/src/test/typescript/integration/cdl-connector-manual.test.ts b/packages/cactus-plugin-ledger-connector-cdl-socketio/src/test/typescript/integration/cdl-connector-manual.test.ts index a4aa29f07c..56fe65e8c2 100644 --- a/packages/cactus-plugin-ledger-connector-cdl-socketio/src/test/typescript/integration/cdl-connector-manual.test.ts +++ b/packages/cactus-plugin-ledger-connector-cdl-socketio/src/test/typescript/integration/cdl-connector-manual.test.ts @@ -161,7 +161,7 @@ describe("CDL Connector manual tests", () => { // Create ApiClient instance const apiConfigOptions = { validatorID: "cdl-connector-manual.test", - validatorURL: `https://localhost:${connectorAddress.port}`, + validatorURL: `https://127.0.0.1:${connectorAddress.port}`, validatorKeyPath: VALIDATOR_KEY_PATH, logLevel: sutLogLevel, maxCounterRequestID: 1000, diff --git a/packages/cactus-plugin-ledger-connector-corda/package.json b/packages/cactus-plugin-ledger-connector-corda/package.json index 430cceb7db..146f763977 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-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.7.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.7.test.ts index c16bc38f0d..024260f04d 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.7.test.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.7.test.ts @@ -324,7 +324,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8-express.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8-express.test.ts index 21eda4ee24..c370a288d5 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8-express.test.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8-express.test.ts @@ -143,7 +143,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts index a88ee54434..61ec03e36c 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes-v4.8.test.ts @@ -325,7 +325,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes.test.ts b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes.test.ts index eb719c36ae..d0a44cca51 100644 --- a/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes.test.ts +++ b/packages/cactus-plugin-ledger-connector-corda/src/test/typescript/integration/deploy-cordapp-jars-to-nodes.test.ts @@ -329,7 +329,7 @@ test.skip("Tests are passing on the JVM side", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-ethereum/package.json b/packages/cactus-plugin-ledger-connector-ethereum/package.json index 4ed11bd04e..37450f88bb 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 --ignore-file-override ../../openapi-generator-ignore", @@ -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 3de89a7f09..054882e8aa 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-fabric/src/main/typescript/identity/vault-client.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/vault-client.ts index a720995b16..e6f8ad60b2 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/vault-client.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/vault-client.ts @@ -10,7 +10,7 @@ import { ECCurveType } from "./internal/crypto-util"; export interface IVaultTransitClientOptions { // full url of vault server - // eg : http://localhost:8200 + // eg : http://127.0.0.1:8200 endpoint: string; // mountPath of transit secret engine diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts index c8f48d1c75..958d68fd1c 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/main/typescript/identity/web-socket-client.ts @@ -10,7 +10,7 @@ import { WsIdentityClient } from "ws-identity-client"; export interface WSClientOptions { // full url of web-socket identity server - // eg : http://localhost:8700 + // eg : http://127.0.0.1:8700 endpoint: string; // pathPrefix for incoming web-socket connections diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/deploy-cc-from-golang-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/deploy-cc-from-golang-source.test.ts index ab0ba55160..fcdf0eeca5 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/deploy-cc-from-golang-source.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/deploy-cc-from-golang-source.test.ts @@ -149,7 +149,7 @@ test.skip(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -159,7 +159,7 @@ test.skip(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); const apiClient = new FabricApi(config); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/run-transaction-endpoint-v1.test.ts index bba7ebde5a..ae0764052a 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/run-transaction-endpoint-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v1-4-x/run-transaction-endpoint-v1.test.ts @@ -127,7 +127,7 @@ test.skip(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source-private-data.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source-private-data.test.ts index 6f9f30262f..48192e790c 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source-private-data.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source-private-data.test.ts @@ -82,13 +82,13 @@ describe(testCase, () => { await ledger.start({ omitPull: false }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; ({ port } = addressInfo); - apiUrl = `http://localhost:${port}`; + apiUrl = `http://127.0.0.1:${port}`; configuration = new Configuration({ basePath: apiUrl }); apiClient = new FabricApi(configuration); @@ -377,8 +377,8 @@ describe(testCase, () => { keychainRef: keychainEntryKey, }, }); - - + + */ const getResQuery = await apiClient.runTransactionV1({ diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts index 39f0254088..0513ce02e6 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-golang-source.test.ts @@ -165,7 +165,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -175,7 +175,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts index 7a70bfbb76..51d3be707a 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-javascript-source.test.ts @@ -167,7 +167,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -177,7 +177,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts index 439332ced7..3d9ecdbacf 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-cc-from-typescript-source.test.ts @@ -165,7 +165,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -175,7 +175,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-lock-asset.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-lock-asset.test.ts index 7d31bdd4ab..ca4afd15f4 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-lock-asset.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/deploy-lock-asset.test.ts @@ -170,7 +170,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -180,7 +180,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts index f9e9337d8e..7ef4945eb2 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-endpoint-v1.test.ts @@ -99,7 +99,7 @@ describe(testCase, () => { await ledger.start({ omitPull: false }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts index fa705a84cb..365ae19f18 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation-go.test.ts @@ -105,7 +105,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -121,7 +121,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); const apiClient = new FabricApi(config); diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts index c1e9c9f256..ad579a9fbe 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -160,7 +160,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -176,7 +176,7 @@ test(testCase, async (t: Test) => { await plugin.getOrCreateWebServices(); await plugin.registerWebServices(expressApp); - const apiUrl = `http://localhost:${port}`; + const apiUrl = `http://127.0.0.1:${port}`; const config = new Configuration({ basePath: apiUrl }); 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 f6dacda2c7..53869fd7b4 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-go-ethereum-socketio/src/test/typescript/integration/go-ethereum-socketio-connector.test.ts b/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/src/test/typescript/integration/go-ethereum-socketio-connector.test.ts index 12c1ff0fae..89f4210542 100644 --- a/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/src/test/typescript/integration/go-ethereum-socketio-connector.test.ts +++ b/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/src/test/typescript/integration/go-ethereum-socketio-connector.test.ts @@ -112,7 +112,7 @@ describe("Go-Ethereum-SocketIO connector tests", () => { // Generate connector private key and certificate const pkiGenerator = new SelfSignedPkiGenerator(); - const pki = pkiGenerator.create("localhost"); + const pki = pkiGenerator.create("127.0.0.1"); connectorPrivKeyValue = pki.privateKeyPem; connectorCertValue = pki.certificatePem; const jwtAlgo = "RS512"; @@ -151,7 +151,7 @@ describe("Go-Ethereum-SocketIO connector tests", () => { // Create ApiClient instance const apiConfigOptions = { validatorID: "go-eth-socketio-test", - validatorURL: `https://localhost:${connectorAddress.port}`, + validatorURL: `https://127.0.0.1:${connectorAddress.port}`, validatorKeyValue: connectorCertValue, logLevel: sutLogLevel, maxCounterRequestID: 1000, diff --git a/packages/cactus-plugin-ledger-connector-iroha/package.json b/packages/cactus-plugin-ledger-connector-iroha/package.json index 149ef28cf7..565451d3e2 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-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts index 498b9ea0b7..77c8041455 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts @@ -143,7 +143,7 @@ describe("Generate and send signed transaction tests", () => { expressApp.use(bodyParser.json({ limit: "250mb" })); connectorServer = http.createServer(expressApp); const listenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: connectorServer, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts index 9e8fba0be0..1ffc23c1ba 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts @@ -137,7 +137,7 @@ test.skip(testCase, async (t: Test) => { expressApp1.use(bodyParser.json({ limit: "250mb" })); const server1 = http.createServer(expressApp1); const listenOptions1: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: server1, }; @@ -151,7 +151,7 @@ test.skip(testCase, async (t: Test) => { expressApp2.use(bodyParser.json({ limit: "250mb" })); const server2 = http.createServer(expressApp2); const listenOptions2: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: server2, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts index d738621eaa..adc9fcd209 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts @@ -207,7 +207,7 @@ describe("Iroha SocketIo TestSuite", () => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts index 58584b4133..d004a712a5 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -114,7 +114,7 @@ test(testCase, async (t: Test) => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts index 5b1ef80009..a9bc2ab842 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts @@ -107,7 +107,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/iroha-test-ledger-parameters.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/iroha-test-ledger-parameters.test.ts index e066d2fb2c..e4ddb2420a 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/iroha-test-ledger-parameters.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/unit/iroha-test-ledger-parameters.test.ts @@ -23,7 +23,7 @@ test("Iroha environment variables passed correctly", async (t: Test) => { ]; const irohaOptions = { - postgresHost: "localhost", + postgresHost: "127.0.0.1", postgresPort: 5432, envVars: simpleEnvVars, }; diff --git a/packages/cactus-plugin-ledger-connector-iroha2/package.json b/packages/cactus-plugin-ledger-connector-iroha2/package.json index f754a678d1..8e912dd731 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 e081474c1c..add11121de 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-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation-no-keychain.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation-no-keychain.test.ts index 26294d4007..9691f9215e 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation-no-keychain.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation-no-keychain.test.ts @@ -83,7 +83,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation.test.ts index ab52684793..5a6694949c 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/openapi/openapi-validation.test.ts @@ -105,7 +105,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object-endpoints.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object-endpoints.test.ts index 2ba9222d36..ea85cd1951 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object-endpoints.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object-endpoints.test.ts @@ -87,7 +87,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object.test.ts index ae31bf2105..88141afedc 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-deploy-contract-from-json-json-object.test.ts @@ -87,7 +87,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-invoke-contract-json-object-endpoints.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-invoke-contract-json-object-endpoints.test.ts index bb1066d1d6..e1164b9756 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-invoke-contract-json-object-endpoints.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v2.3.0-invoke-contract-json-object-endpoints.test.ts @@ -73,7 +73,7 @@ test("Quorum Ledger Connector Plugin", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object-endpoints.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object-endpoints.test.ts index 17ce5c67f6..121064e3f6 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object-endpoints.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object-endpoints.test.ts @@ -84,7 +84,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object.test.ts index 8b86d17561..b6af9ab35f 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json-json-object.test.ts @@ -84,7 +84,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json.test.ts index 69edb85e67..aa98b648da 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-deploy-contract-from-json.test.ts @@ -112,7 +112,7 @@ describe(testCase, () => { pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-invoke-contract-json-object-endpoints.test.ts b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-invoke-contract-json-object-endpoints.test.ts index 968ec8f8d3..4479b17ae7 100644 --- a/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-invoke-contract-json-object-endpoints.test.ts +++ b/packages/cactus-plugin-ledger-connector-quorum/src/test/typescript/integration/plugin-ledger-connector-quorum/deploy-contract/v21.4.1-invoke-contract-json-object-endpoints.test.ts @@ -73,7 +73,7 @@ test("Quorum Ledger Connector Plugin", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/package.json b/packages/cactus-plugin-ledger-connector-sawtooth/package.json index 0131b53183..30abacea90 100644 --- a/packages/cactus-plugin-ledger-connector-sawtooth/package.json +++ b/packages/cactus-plugin-ledger-connector-sawtooth/package.json @@ -61,7 +61,7 @@ "axios": "1.6.0", "cbor": "9.0.1", "rxjs": "7.8.1", - "socket.io-client": "4.5.4" + "socket.io-client-fixed-types": "4.5.4" }, "devDependencies": { "@hyperledger/cactus-test-tooling": "2.0.0-alpha.2", @@ -73,7 +73,7 @@ "uuid": "9.0.1" }, "engines": { - "node": ">=16", + "node": ">=18", "npm": ">=8" }, "publishConfig": { diff --git a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/api-client/sawtooth-api-client.ts b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/api-client/sawtooth-api-client.ts index 6400c94c00..f2e4f200c9 100644 --- a/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/api-client/sawtooth-api-client.ts +++ b/packages/cactus-plugin-ledger-connector-sawtooth/src/main/typescript/api-client/sawtooth-api-client.ts @@ -1,6 +1,6 @@ import { Observable, ReplaySubject } from "rxjs"; import { finalize } from "rxjs/operators"; -import { io } from "socket.io-client"; +const { io } = require("socket.io-client-fixed-types"); import { Logger, Checks, 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 660e62e961..0b1319026e 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 f4df6c30d0..4b03d54464 100644 --- a/packages/cactus-plugin-ledger-connector-ubiquity/package.json +++ b/packages/cactus-plugin-ledger-connector-ubiquity/package.json @@ -59,7 +59,7 @@ "@hyperledger/cactus-core-api": "2.0.0-alpha.2", "axios": "1.6.0", "dotenv": "16.0.1", - "node-fetch": "3.3.2", + "node-fetch": "2.7.0", "prom-client": "13.2.0", "typescript-optional": "2.0.1", "ubiquity-ts-client-renovated": "1.0.0", @@ -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 4559e4554b..b0ae848812 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-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts index 15aacd8d4a..d9122a7e2b 100644 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts +++ b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai-json-object.test.ts @@ -76,7 +76,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts index be0d8f17d1..5e2916df6a 100644 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts +++ b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/deploy-contract-from-json-xdai.test.ts @@ -102,7 +102,7 @@ describe(testCase, () => { pluginRegistry: new PluginRegistry({ plugins: [keychainPlugin] }), })) as PluginLedgerConnectorXdai; const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts index 8730f55984..44e59e2c14 100644 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts +++ b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation-no-keychain.test.ts @@ -72,7 +72,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts index 30cd494476..712ba58135 100644 --- a/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-ledger-connector-xdai/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -99,7 +99,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-plugin-odap-hermes/package.json b/packages/cactus-plugin-odap-hermes/package.json index 188f837f00..2fced88463 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-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts index 6916fa6044..c7faa43c05 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts @@ -144,7 +144,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -282,7 +282,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -493,7 +493,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -617,7 +617,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -636,7 +636,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; @@ -801,7 +801,7 @@ test("client gateway crashes after lock fabric asset", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts index e152204ce9..590e4fd431 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts @@ -141,7 +141,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -279,7 +279,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -489,7 +489,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -607,7 +607,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -626,7 +626,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; @@ -827,7 +827,7 @@ test("client gateway crashes after deleting fabric asset", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts index 06d414a8b7..2b25f13e64 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts @@ -141,7 +141,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -279,7 +279,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -490,7 +490,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -608,7 +608,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -627,7 +627,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; @@ -763,7 +763,7 @@ test("client gateway crashes after lock fabric asset", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts index dff7aff312..ed2d4b4d59 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts @@ -76,7 +76,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -125,7 +125,7 @@ beforeAll(async () => { serverExpressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayserver = http.createServer(serverExpressApp); serverListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: recipientGatewayserver, }; @@ -165,7 +165,7 @@ beforeAll(async () => { clientExpressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(clientExpressApp); clientListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 2000, server: sourceGatewayServer, }; @@ -289,7 +289,7 @@ test("successful run ODAP after client gateway crashed after after receiving tra clientExpressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(clientExpressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 2000, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts index 52928195bc..f1e10e8890 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts @@ -136,7 +136,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -274,7 +274,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -480,7 +480,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -574,7 +574,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -593,7 +593,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts index 4510dfad61..a89617c6fc 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts @@ -33,7 +33,6 @@ import { FabricOdapGateway } from "../../../main/typescript/gateway/fabric-odap- import { ClientGatewayHelper } from "../../../main/typescript/gateway/client/client-helper"; import { ServerGatewayHelper } from "../../../main/typescript/gateway/server/server-helper"; - const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -63,7 +62,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -134,7 +133,7 @@ test("runs ODAP between two gateways via openApi", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayserver = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: recipientGatewayserver, }; @@ -153,7 +152,7 @@ test("runs ODAP between two gateways via openApi", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 2000, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts index 2e3cb92993..c70f86093e 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts @@ -141,7 +141,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -282,7 +282,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -492,7 +492,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -608,7 +608,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -627,7 +627,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; @@ -862,7 +862,7 @@ test("client sends rollback message at the end of the protocol", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts index 850494b852..cb0af776c8 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts @@ -50,7 +50,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts index 8b2d7c5a5f..27bbc707ac 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts @@ -141,7 +141,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -278,7 +278,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); fabricServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: fabricServer, }; @@ -488,7 +488,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); besuServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 4000, server: besuServer, }; @@ -610,7 +610,7 @@ beforeEach(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; @@ -629,7 +629,7 @@ beforeEach(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3001, server: sourceGatewayServer, }; @@ -849,7 +849,7 @@ test("server gateway crashes after creating besu asset", async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 5000, server: recipientGatewayServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts index 3e588b34e9..bc5a9a07bb 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts @@ -77,7 +77,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; @@ -125,7 +125,7 @@ beforeAll(async () => { serverExpressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayserver = http.createServer(serverExpressApp); serverListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: recipientGatewayserver, }; @@ -165,7 +165,7 @@ beforeAll(async () => { clientExpressApp.use(bodyParser.json({ limit: "250mb" })); sourceGatewayServer = http.createServer(clientExpressApp); clientListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 2000, server: sourceGatewayServer, }; @@ -253,7 +253,7 @@ test("server gateway crashes after transfer initiation flow", async () => { serverExpressApp.use(bodyParser.json({ limit: "250mb" })); recipientGatewayserver = http.createServer(serverExpressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 3000, server: recipientGatewayserver, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/commit-final.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/commit-final.test.ts index 1c1ba8dc55..1c0f150c52 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/commit-final.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/commit-final.test.ts @@ -60,7 +60,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts index f57c88fccd..64e509d43e 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts @@ -17,7 +17,6 @@ import { Configuration } from "@hyperledger/cactus-core-api"; import { PluginOdapGateway } from "../../../../main/typescript/gateway/plugin-odap-gateway"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; - import { OdapLocalLog, SessionData, @@ -71,7 +70,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-success.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-success.test.ts index 4c1d884654..a58da38eeb 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-success.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-success.test.ts @@ -53,7 +53,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts index 55b4ce6106..3325fbaaa1 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts @@ -16,7 +16,6 @@ import { Configuration } from "@hyperledger/cactus-core-api"; import { PluginOdapGateway } from "../../../../main/typescript/gateway/plugin-odap-gateway"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; - import { RecoverUpdateAckV1Message, SessionData, @@ -54,7 +53,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update.test.ts index bddd607fbd..824b35e4c6 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update.test.ts @@ -64,7 +64,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts index e0414ba4e1..16fcbf3e6f 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts @@ -57,7 +57,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/commit-final.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/commit-final.test.ts index 65e29de27d..b0cfb6d2ae 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/commit-final.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/commit-final.test.ts @@ -61,7 +61,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/lock-evidence.test.ts b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/lock-evidence.test.ts index 5ade55da59..d68d2b5811 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/lock-evidence.test.ts +++ b/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/lock-evidence.test.ts @@ -23,7 +23,6 @@ import { Configuration } from "@hyperledger/cactus-core-api"; import { PluginObjectStoreIpfs } from "@hyperledger/cactus-plugin-object-store-ipfs"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; - import express from "express"; import { AddressInfo } from "net"; @@ -64,7 +63,7 @@ beforeAll(async () => { expressApp.use(bodyParser.json({ limit: "250mb" })); ipfsServer = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server: ipfsServer, }; diff --git a/packages/cactus-plugin-persistence-ethereum/package.json b/packages/cactus-plugin-persistence-ethereum/package.json index 9c30af69a7..5be367856f 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-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts b/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts index 5810d8b3da..d5e2e6892c 100644 --- a/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts +++ b/packages/cactus-plugin-persistence-ethereum/src/test/typescript/integration/persistence-ethereum-postgresql-db-client.test.ts @@ -91,11 +91,11 @@ describe("Ethereum persistence PostgreSQL PostgresDatabaseClient tests", () => { await postgresContainer.start(); const postgresPort = await postgresContainer.getPostgresPort(); expect(postgresPort).toBeTruthy(); - log.info(`Postgres running at localhost:${postgresPort}`); + log.info(`Postgres running at 127.0.0.1:${postgresPort}`); log.info("Create PostgresDatabaseClient"); dbClient = new PostgresDatabaseClient({ - connectionString: `postgresql://postgres:postgres@localhost:${postgresPort}/postgres`, + connectionString: `postgresql://postgres:postgres@127.0.0.1:${postgresPort}/postgres`, logLevel: sutLogLevel, }); diff --git a/packages/cactus-plugin-persistence-fabric/package.json b/packages/cactus-plugin-persistence-fabric/package.json index 2367a37bce..d26afea85f 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-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-db-client.test.ts b/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-db-client.test.ts index 36e8f609f0..6dfd66b273 100644 --- a/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-db-client.test.ts +++ b/packages/cactus-plugin-persistence-fabric/src/test/typescript/integration/persistence-fabric-db-client.test.ts @@ -58,11 +58,11 @@ describe("Fabric persistence PostgreSQL PostgresDatabaseClient tests", () => { const postgresPort = await postgresContainer.getPostgresPort(); expect(postgresPort).toBeTruthy(); - log.info(`Postgres running at localhost:${postgresPort}`); + log.info(`Postgres running at 127.0.0.1:${postgresPort}`); log.info("Create PostgresDatabaseClient"); dbClient = new PostgresDatabaseClient({ - connectionString: `postgresql://postgres:postgres@localhost:${postgresPort}/postgres`, + connectionString: `postgresql://postgres:postgres@127.0.0.1:${postgresPort}/postgres`, logLevel: sutLogLevel, }); diff --git a/packages/cactus-test-api-client/package.json b/packages/cactus-test-api-client/package.json index ca30e2f536..f7d9b3b184 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 9936c2758d..ed3978602f 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-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts b/packages/cactus-test-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts index 6b94e22752..864409efca 100644 --- a/packages/cactus-test-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts +++ b/packages/cactus-test-cmd-api-server/src/test/typescript/integration/remote-plugin-imports.test.ts @@ -68,7 +68,7 @@ describe(testCase, () => { console.log(`CactusKeychainVaultServer (Port=${hostPort}) started OK`); const configuration = new Configuration({ - basePath: `http://localhost:${hostPort}`, + basePath: `http://127.0.0.1:${hostPort}`, }); const apiClient = new DefaultApi(configuration); diff --git a/packages/cactus-test-geth-ledger/package.json b/packages/cactus-test-geth-ledger/package.json index af27802a4f..9f7254268f 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 3cc916ec8d..2d3a40544a 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 4e0d6523c1..4a8db4be5a 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-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts index 8c7fb285f4..ed273dacbb 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint-invalid.test.ts @@ -72,7 +72,7 @@ describe(testCase, () => { await besuTestLedger.start(); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts index 105970c494..ae58a1a723 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-single-status-endpoint.test.ts @@ -132,7 +132,7 @@ describe(testCase, () => { pluginRegistry.add(pluginHtlc); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts index 0f088b51ed..f710734fee 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/get-status-endpoint.test.ts @@ -123,7 +123,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -345,7 +345,7 @@ test("Test get invalid id status", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts index 2ff390bec7..3b5b36f9fc 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/new-contract-endpoint.test.ts @@ -117,7 +117,7 @@ describe(testCase, () => { }); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts index a34f11df5d..4e3f8b4bd4 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/openapi/openapi-validation.test.ts @@ -145,7 +145,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts index e3386a0e63..4e81c9a226 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint-invalid-time.test.ts @@ -86,7 +86,7 @@ describe(testCase, () => { await besuTestLedger.start(); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts index 2815a64610..1d4b6f605d 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu-erc20/src/test/typescript/integration/plugin-htlc-eth-besu-erc20/refund-endpoint.test.ts @@ -131,7 +131,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; @@ -409,7 +409,7 @@ test("Test invalid refund with invalid time", async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/package.json b/packages/cactus-test-plugin-htlc-eth-besu/package.json index 4c4c67f491..13bc986edf 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-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts index 78ea6619fd..d22c18ed64 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint-invalid.test.ts @@ -46,7 +46,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts index 136cc1338d..4374082ca5 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-single-status-endpoint.test.ts @@ -116,7 +116,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts index 49a0869da1..a6b7ccd2d6 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint-invalid.test.ts @@ -46,7 +46,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts index e4082b0ae3..e779a07c46 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/get-status-endpoint.test.ts @@ -48,7 +48,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts index 485ce2d547..aa6e42836e 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint-invalid.test.ts @@ -40,7 +40,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts index 71b8eb7889..6871560a46 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/initialize-endpoint.test.ts @@ -41,7 +41,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts index 5eae6f0408..bf5ffd75a1 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint-invalid.test.ts @@ -46,7 +46,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts index db8243b925..0c1b1de826 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/new-contract-endpoint.test.ts @@ -46,7 +46,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts index 4bf3f895d5..3a8524c4cd 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/openapi/openapi-validation.test.ts @@ -137,7 +137,7 @@ test(testCase, async (t: Test) => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts index 7095e3bd7a..0ae53cf4d0 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint-invalid.test.ts @@ -45,7 +45,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts index 657f33567b..3cb236c555 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/refund-endpoint.test.ts @@ -50,7 +50,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts index ab4676212b..f9d7ab63a8 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint-invalid.test.ts @@ -47,7 +47,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts index c8a825f125..5810fd86a5 100644 --- a/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts +++ b/packages/cactus-test-plugin-htlc-eth-besu/src/test/typescript/integration/plugin-htlc-eth-besu/withdraw-endpoint.test.ts @@ -53,7 +53,7 @@ describe(testCase, () => { expressApp.use(bodyParser.json({ limit: "250mb" })); const server = http.createServer(expressApp); const listenOptions: IListenOptions = { - hostname: "localhost", + hostname: "127.0.0.1", port: 0, server, }; diff --git a/packages/cactus-test-plugin-ledger-connector-besu/package.json b/packages/cactus-test-plugin-ledger-connector-besu/package.json index e04f5a5b4b..86261701a7 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 68e6dc3357..5bc2e5a5c3 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 55fc0449e2..5b78d40190 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 970debda85..ae94a65b1b 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-tooling/src/main/typescript/besu/besu-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts index 8eb5f247c5..8ebe12f921 100644 --- a/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/besu/besu-test-ledger.ts @@ -254,7 +254,7 @@ export class BesuTestLedger implements ITestLedger { Healthcheck: { Test: [ "CMD-SHELL", - `curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' localhost:8545`, + `curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' 127.0.0.1:8545`, ], Interval: 1000000000, // 1 second Timeout: 3000000000, // 3 seconds @@ -375,7 +375,7 @@ export class BesuTestLedger implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/common/containers.ts b/packages/cactus-test-tooling/src/main/typescript/common/containers.ts index 3aac196ee4..fbedd731ef 100644 --- a/packages/cactus-test-tooling/src/main/typescript/common/containers.ts +++ b/packages/cactus-test-tooling/src/main/typescript/common/containers.ts @@ -380,7 +380,7 @@ export class Containers { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${privatePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${privatePort} mapped to localhost`); + throw new Error(`${fnTag} port ${privatePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts b/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts index 8d84681561..642217a096 100644 --- a/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/corda-connector/corda-connector-container.ts @@ -205,12 +205,12 @@ export class CordaConnectorContainer { public async getSupervisorDLocalhostUrl(): Promise { const port = await this.getSupervisorDPublicPort(); - return `http://localhost:${port}`; + return `http://127.0.0.1:${port}`; } public async getApiLocalhostUrl(): Promise { const port = await this.getApiPublicPort(); - return `http://localhost:${port}`; + return `http://127.0.0.1:${port}`; } public getContainer(): Container { diff --git a/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts index 9d25235a6f..be12dbed74 100644 --- a/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/corda/corda-test-ledger.ts @@ -151,7 +151,7 @@ export class CordaTestLedger implements ITestLedger { // Healthcheck: { // Test: [ // "CMD-SHELL", - // `curl -v 'http://localhost:7005/jolokia/exec/org.apache.activemq.artemis:address=%22rpc.server%22,broker=%22RPC%22,component=addresses,queue=%22rpc.server%22,routing-type=%22multicast%22,subcomponent=queues/countMessages()/'`, + // `curl -v 'http://127.0.0.1:7005/jolokia/exec/org.apache.activemq.artemis:address=%22rpc.server%22,broker=%22RPC%22,component=addresses,queue=%22rpc.server%22,routing-type=%22multicast%22,subcomponent=queues/countMessages()/'`, // ], // Interval: 1000000000, // 1 second // Timeout: 3000000000, // 3 seconds @@ -333,7 +333,7 @@ export class CordaTestLedger implements ITestLedger { public async getSupervisorDLocalhostUrl(): Promise { const port = await this.getSupervisorDPublicPort(); - return `http://localhost:${port}`; + return `http://127.0.0.1:${port}`; } public async getSSHPublicPort(): Promise { diff --git a/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts b/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts index 2c67485473..976bf9232c 100644 --- a/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts +++ b/packages/cactus-test-tooling/src/main/typescript/fabric/fabric-test-ledger-v1.ts @@ -389,20 +389,20 @@ export class FabricTestLedgerV1 implements ITestLedger { // peer0.org1.example.com const privatePort = 7051; const hostPort = await Containers.getPublicPort(privatePort, cInfo); - ccp.peers["peer0.org1.example.com"].url = `grpcs://localhost:${hostPort}`; + ccp.peers["peer0.org1.example.com"].url = `grpcs://127.0.0.1:${hostPort}`; } if (ccp.peers["peer1.org1.example.com"]) { // peer1.org1.example.com const privatePort = 8051; const hostPort = await Containers.getPublicPort(privatePort, cInfo); - ccp.peers["peer1.org1.example.com"].url = `grpcs://localhost:${hostPort}`; + ccp.peers["peer1.org1.example.com"].url = `grpcs://127.0.0.1:${hostPort}`; } { // ca_peerOrg1 const privatePort = 7054; const hostPort = await Containers.getPublicPort(privatePort, cInfo); const { certificateAuthorities: cas } = ccp; - cas["ca.org1.example.com"].url = `https://localhost:${hostPort}`; + cas["ca.org1.example.com"].url = `https://127.0.0.1:${hostPort}`; } // FIXME - this still doesn't work. At this moment the only successful tests @@ -417,7 +417,7 @@ export class FabricTestLedgerV1 implements ITestLedger { const privatePort = 7050; const hostPort = await Containers.getPublicPort(privatePort, cInfo); - const url = `grpcs://localhost:${hostPort}`; + const url = `grpcs://127.0.0.1:${hostPort}`; const ORDERER_PEM_PATH_FABRIC_V1 = "/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"; const ORDERER_PEM_PATH_FABRIC_V2 = @@ -462,11 +462,11 @@ export class FabricTestLedgerV1 implements ITestLedger { // with discovery // { // const { grpcOptions } = ccp.peers["peer0.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; + // grpcOptions.hostnameOverride = `127.0.0.1`; // } // { // const { grpcOptions } = ccp.peers["peer1.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; + // grpcOptions.hostnameOverride = `127.0.0.1`; // } } return ccp; @@ -516,7 +516,7 @@ export class FabricTestLedgerV1 implements ITestLedger { const privatePortPeer0 = parseFloat(urlGrpcs.replace(/^\D+/g, "")); const hostPort = await Containers.getPublicPort(privatePortPeer0, cInfo); - ccp["peers"][peer0Name]["url"] = `grpcs://localhost:${hostPort}`; + ccp["peers"][peer0Name]["url"] = `grpcs://127.0.0.1:${hostPort}`; // if there is a peer1 if (ccp.peers["peer1.org" + orgName + ".example.com"]) { @@ -527,7 +527,7 @@ export class FabricTestLedgerV1 implements ITestLedger { privatePortPeer1, cInfo, ); - ccp["peers"][peer1Name]["url"] = `grpcs://localhost:${hostPortPeer1}`; + ccp["peers"][peer1Name]["url"] = `grpcs://127.0.0.1:${hostPortPeer1}`; } { // ca_peerOrg1 @@ -537,7 +537,7 @@ export class FabricTestLedgerV1 implements ITestLedger { const caHostPort = await Containers.getPublicPort(caPort, cInfo); const { certificateAuthorities: cas } = ccp; - cas[caName].url = `https://localhost:${caHostPort}`; + cas[caName].url = `https://127.0.0.1:${caHostPort}`; } // FIXME - this still doesn't work. At this moment the only successful tests @@ -552,7 +552,7 @@ export class FabricTestLedgerV1 implements ITestLedger { const privatePort = 7050; const hostPort = await Containers.getPublicPort(privatePort, cInfo); - const url = `grpcs://localhost:${hostPort}`; + const url = `grpcs://127.0.0.1:${hostPort}`; const ORDERER_PEM_PATH_FABRIC_V1 = "/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem"; const ORDERER_PEM_PATH_FABRIC_V2 = @@ -597,11 +597,11 @@ export class FabricTestLedgerV1 implements ITestLedger { // with discovery // { // const { grpcOptions } = ccp.peers["peer0.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; + // grpcOptions.hostnameOverride = `127.0.0.1`; // } // { // const { grpcOptions } = ccp.peers["peer1.org1.example.com"]; - // grpcOptions.hostnameOverride = `localhost`; + // grpcOptions.hostnameOverride = `127.0.0.1`; // } } return ccp; @@ -1277,7 +1277,7 @@ export class FabricTestLedgerV1 implements ITestLedger { const containerInfo = await this.getContainerInfo(); const port = await Containers.getPublicPort(22, containerInfo); const sshConfig: SshConfig = { - host: "localhost", + host: "127.0.0.1", privateKey, username: "root", port, diff --git a/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts b/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts index b95a6d6e92..75723d9304 100644 --- a/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/http-echo/http-echo-container.ts @@ -181,7 +181,7 @@ export class HttpEchoContainer implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/iroha/iroha-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/iroha/iroha-test-ledger.ts index 407ccbceb0..d60711e2bf 100644 --- a/packages/cactus-test-tooling/src/main/typescript/iroha/iroha-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/iroha/iroha-test-ledger.ts @@ -442,7 +442,7 @@ export class IrohaTestLedger implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts index 0a3b11c840..de74d16735 100644 --- a/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/iroha/iroha2-test-ledger.ts @@ -294,7 +294,7 @@ export class Iroha2TestLedger implements ITestLedger { /** * Change the port in URL from original to the one that was exported by docker - * (i.e. the one that is available in `localhost` running this container, not inside the container). + * (i.e. the one that is available in `127.0.0.1` running this container, not inside the container). * * @param url some URL ending with a port (e.g. `http://127.0.0.1:8080`) * @param containerInfo dockerode container info. @@ -320,7 +320,7 @@ export class Iroha2TestLedger implements ITestLedger { /** * Read client config file from the container. Adjust the ports in URL so that the endpoints - * can be used from localhost. + * can be used from 127.0.0.1. * * @returns parsed `Iroha2ClientConfig` */ diff --git a/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts b/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts index 1cec545ed2..30aa9f1c05 100644 --- a/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/keycloak/keycloak-container.ts @@ -101,7 +101,7 @@ export class KeycloakContainer { this.log.debug(`Effective Env of container: %o`, Env); const Healthcheck = { - Test: ["CMD-SHELL", `curl -v 'http://localhost:9990/'`], + Test: ["CMD-SHELL", `curl -v 'http://127.0.0.1:9990/'`], Interval: 1000000000, // 1 second Timeout: 3000000000, // 3 seconds Retries: 99, @@ -144,7 +144,7 @@ export class KeycloakContainer { // tokenURL: "https://www.example.com/oauth2/token", // clientID: "EXAMPLE_CLIENT_ID", // clientSecret: "EXAMPLE_CLIENT_SECRET", - // callbackURL: "http://localhost:3000/auth/example/callback", + // callbackURL: "http://127.0.0.1:3000/auth/example/callback", // } public async getOauth2Options(clientId = "account"): Promise { const fnTag = `${this.className}#getOauth2Options()`; @@ -219,7 +219,7 @@ export class KeycloakContainer { Checks.truthy(clientId, `${fnTag}:clientId`); const { log } = this; const defaultRealm = await this.getDefaultRealm(); - const apiBaseUrl = await this.getApiBaseUrl("localhost"); + const apiBaseUrl = await this.getApiBaseUrl("127.0.0.1"); const realm = defaultRealm.realm; const realmBaseUrl = `${apiBaseUrl}/realms/${realm}`; @@ -228,7 +228,7 @@ export class KeycloakContainer { const client = clients.find((c) => c.clientId === clientId); log.debug("SAML2 client: %o", JSON.stringify(client, null, 4)); - // http://localhost:32819/auth/realms/master/protocol/saml + // http://127.0.0.1:32819/auth/realms/master/protocol/saml const saml2Opts = { entryPoint: `${realmBaseUrl}/protocol/saml`, // issuer: 'https://your-app.example.net/login/callback', diff --git a/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts b/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts index ac8dfc5636..628b9ffa2a 100644 --- a/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/localstack/localstack-container.ts @@ -100,7 +100,7 @@ export class LocalStackContainer { Healthcheck: { Test: [ "CMD-SHELL", - 'curl -s localhost:4566/health | grep \'"secretsmanager": "running"\'', + 'curl -s 127.0.0.1:4566/health | grep \'"secretsmanager": "running"\'', ], Interval: 100 * 1000000, }, diff --git a/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts index 7a8fed5821..f7bf1bf17d 100644 --- a/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/openethereum/openethereum-test-ledger.ts @@ -124,7 +124,7 @@ export class OpenEthereumTestLedger { const Env = [...[], ...this.envVars]; this.log.debug(`Effective Env of container: %o`, Env); - const apiUrl = await this.getRpcApiHttpHost("localhost", this.httpPort); + const apiUrl = await this.getRpcApiHttpHost("127.0.0.1", this.httpPort); const Healthcheck = { Test: ["CMD-SHELL", `curl -v '${apiUrl}'`], Interval: 1000000000, // 1 second diff --git a/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts b/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts index 97fd5e4e0d..9a203ba8e7 100644 --- a/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts +++ b/packages/cactus-test-tooling/src/main/typescript/postgres/postgres-test-container.ts @@ -256,7 +256,7 @@ export class PostgresTestContainer implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts index c1b0838c4f..45b366d0b7 100644 --- a/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/quorum/quorum-test-ledger.ts @@ -360,7 +360,7 @@ export class QuorumTestLedger implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } @@ -383,7 +383,7 @@ export class QuorumTestLedger implements ITestLedger { if (!mapping.PublicPort) { throw new Error(`${fnTag} port ${thePort} mapped but not public`); } else if (mapping.IP !== "0.0.0.0") { - throw new Error(`${fnTag} port ${thePort} mapped to localhost`); + throw new Error(`${fnTag} port ${thePort} mapped to 127.0.0.1`); } else { return mapping.PublicPort; } diff --git a/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts b/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts index c68311bf39..89538dfbb1 100644 --- a/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts +++ b/packages/cactus-test-tooling/src/main/typescript/sawtooth/sawtooth-test-ledger.ts @@ -227,7 +227,7 @@ export class SawtoothTestLedger implements ITestLedger { } /** - * Get localhost port that can be used to access ledger rest API in the container. + * Get 127.0.0.1 port that can be used to access ledger rest API in the container. * * @returns port */ @@ -243,7 +243,7 @@ export class SawtoothTestLedger implements ITestLedger { } /** - * Get localhost URL that can be used to access ledger rest API in the container. + * Get 127.0.0.1 URL that can be used to access ledger rest API in the container. * * @returns Sawtooth Rest API URL. */ diff --git a/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts b/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts index c4515322f7..d2483aa1e6 100644 --- a/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts +++ b/packages/cactus-test-tooling/src/main/typescript/socketio-test-setup-helpers/socketio-test-setup-helpers.ts @@ -2,8 +2,17 @@ * Helper module for setting up client/server test sockets. */ -import { Server, ServerOptions as SocketServerOptions, Socket as ServerSocket } from "socket.io"; -import { io, Socket as ClientSocket, ManagerOptions, SocketOptions } from "socket.io-client-fixed-types"; +import { + Server, + ServerOptions as SocketServerOptions, + Socket as ServerSocket, +} from "socket.io"; +import { + io, + Socket as ClientSocket, + ManagerOptions, + SocketOptions, +} from "socket.io-client-fixed-types"; import { createServer } from "http"; export { Server, ServerSocket, ClientSocket }; @@ -20,7 +29,7 @@ export function createListeningMockServer(): Promise<[Server, string]> { const socketServerOptions: Partial = { transports: ["websocket"], - cookie: false + cookie: false, }; const testServer = new Server(httpServer, socketServerOptions); @@ -39,20 +48,18 @@ export function createListeningMockServer(): Promise<[Server, string]> { } /** - * Create client socket to localhost. + * Create client socket to 127.0.0.1. * * @port - Localhost port to connect to. */ export function createClientSocket(port: string): ClientSocket { - const clientSocketOpts: Partial = { reconnectionAttempts: 10, reconnectionDelay: 1000, - // @ts-ignore transports: ["websocket"], }; - return io(`http://localhost:${port}`, clientSocketOpts as any); + return io(`http://127.0.0.1:${port}`, clientSocketOpts as any); } /** diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts index 2d88446d11..2af3ed0865 100644 --- a/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts +++ b/packages/cactus-test-tooling/src/test/typescript/integration/besu/besu-test-ledger/constructor-validates-options.test.ts @@ -36,8 +36,8 @@ test("starts/stops/destroys a docker container", async (assert: Test) => { assert.ok(hostPort, "getRpcApiPublicPort() returns truthy OK"); assert.ok(isFinite(hostPort), "getRpcApiPublicPort() returns finite OK"); - const isReachable = await isPortReachable(hostPort, { host: "localhost" }); - assert.ok(isReachable, `HostPort ${hostPort} is reachable via localhost`); + const isReachable = await isPortReachable(hostPort, { host: "127.0.0.1" }); + assert.ok(isReachable, `HostPort ${hostPort} is reachable via 127.0.0.1`); const besuKeyPair: IKeyPair = await besuTestLedger.getBesuKeyPair(); assert.ok(besuKeyPair, "getBesuKeyPair() returns truthy OK"); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha-test-ledger/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha-test-ledger/constructor-validates-options.test.ts index 3209b1f891..92fd7a35a6 100644 --- a/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha-test-ledger/constructor-validates-options.test.ts +++ b/packages/cactus-test-tooling/src/test/typescript/integration/iroha/iroha-test-ledger/constructor-validates-options.test.ts @@ -18,7 +18,7 @@ test.skip("constructor throws if invalid input is provided", (t: Test) => { () => new IrohaTestLedger({ imageVersion: "nope", - postgresHost: "localhost", + postgresHost: "127.0.0.1", postgresPort: 5432, }), ); @@ -30,7 +30,7 @@ test.skip("constructor does not throw if valid input is provided", (t: Test) => t.doesNotThrow( () => new IrohaTestLedger({ - postgresHost: "localhost", + postgresHost: "127.0.0.1", postgresPort: 5432, }), ); @@ -97,8 +97,8 @@ test.skip("starts/stops/destroys a docker container", async (t: Test) => { t.ok(hostPort, "getRpcApiPublicPort() returns truthy OK"); t.ok(isFinite(hostPort), "getRpcApiPublicPort() returns finite OK"); - const isReachable = await isPortReachable(hostPort, { host: "localhost" }); - t.ok(isReachable, `HostPort ${hostPort} is reachable via localhost`); + const isReachable = await isPortReachable(hostPort, { host: "127.0.0.1" }); + t.ok(isReachable, `HostPort ${hostPort} is reachable via 127.0.0.1`); const irohaKeyPair: IKeyPair = await irohaTestLedger.getNodeKeyPair(); t.ok(irohaKeyPair, "getIrohaKeyPair() returns truthy OK"); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts index f55d840e17..d2bd7938a1 100644 --- a/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts +++ b/packages/cactus-test-tooling/src/test/typescript/integration/postgres/postgres-test-container/constructor-validates-options.test.ts @@ -35,8 +35,8 @@ test("starts/stops/destroys a docker container", async (assert: Test) => { assert.ok(hostPort, "getRpcApiPublicPort() returns truthy OK"); assert.ok(isFinite(hostPort), "getRpcApiPublicPort() returns finite OK"); - const isReachable = await isPortReachable(hostPort, { host: "localhost" }); - assert.ok(isReachable, `HostPort ${hostPort} is reachable via localhost`); + const isReachable = await isPortReachable(hostPort, { host: "127.0.0.1" }); + assert.ok(isReachable, `HostPort ${hostPort} is reachable via 127.0.0.1`); assert.end(); }); diff --git a/packages/cactus-test-tooling/src/test/typescript/integration/quorum/quorum-test-ledger/constructor-validates-options.test.ts b/packages/cactus-test-tooling/src/test/typescript/integration/quorum/quorum-test-ledger/constructor-validates-options.test.ts index 0668843b1c..285d8770fa 100644 --- a/packages/cactus-test-tooling/src/test/typescript/integration/quorum/quorum-test-ledger/constructor-validates-options.test.ts +++ b/packages/cactus-test-tooling/src/test/typescript/integration/quorum/quorum-test-ledger/constructor-validates-options.test.ts @@ -39,8 +39,8 @@ tap.test("starts/stops/destroys a docker container", async (assert: any) => { assert.ok(hostPort, "getRpcApiPublicPort() returns truthy OK"); assert.ok(isFinite(hostPort), "getRpcApiPublicPort() returns finite OK"); - const isReachable = await isPortReachable(hostPort, { host: "localhost" }); - assert.ok(isReachable, `HostPort ${hostPort} is reachable via localhost`); + const isReachable = await isPortReachable(hostPort, { host: "127.0.0.1" }); + assert.ok(isReachable, `HostPort ${hostPort} is reachable via 127.0.0.1`); const quorumKeyPair: IKeyPair = await ledger.getQuorumKeyPair(); assert.ok(quorumKeyPair); diff --git a/packages/cactus-test-verifier-client/package.json b/packages/cactus-test-verifier-client/package.json index 4a8f592f16..97cabe0e71 100644 --- a/packages/cactus-test-verifier-client/package.json +++ b/packages/cactus-test-verifier-client/package.json @@ -65,8 +65,8 @@ "web3-eth-accounts": "4.0.3" }, "engines": { - "node": ">=10", - "npm": ">=6" + "node": ">=18", + "npm": ">=8" }, "publishConfig": { "access": "public" diff --git a/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts b/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts index 1a1c8d37cf..50ff7bc257 100644 --- a/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts +++ b/packages/cactus-verifier-client/src/test/typescript/unit/verifier-factory.test.ts @@ -25,7 +25,7 @@ describe("Constructor Tests", () => { { validatorID: "besu_openapi_connector", validatorType: "BESU_2X", - basePath: "localhost", + basePath: "127.0.0.1", ledgerInfo: { ledgerAbstract: "Besu-OpenAPI Ledger", }, @@ -54,7 +54,7 @@ describe("Constructor Tests", () => { { validatorID: "", validatorType: "BESU_2X", - basePath: "localhost", + basePath: "127.0.0.1", username: "admin", password: "password", ledgerInfo: { diff --git a/tools/bump-package-engines.ts b/tools/bump-package-engines.ts new file mode 100755 index 0000000000..6531e79a81 --- /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 9211433cc7..f289722d61 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 1988f2920a..d21da33a03 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 24e0d74c05..1a9f4f27ac 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/config.template.json b/weaver/samples/besu/besu-cli/config.template.json index cc88ed22ec..c48bd42aff 100644 --- a/weaver/samples/besu/besu-cli/config.template.json +++ b/weaver/samples/besu/besu-cli/config.template.json @@ -1,6 +1,6 @@ { "network1": { - "networkHost": "localhost", + "networkHost": "127.0.0.1", "networkPort": 8545, "tokenContract": "../simpleasset/build/contracts/AliceERC721.json", "interopContract": "../simpleasset/build/contracts/AssetExchangeContract.json", @@ -8,7 +8,7 @@ "recipientAccountIndex": 2 }, "network2": { - "networkHost": "localhost", + "networkHost": "127.0.0.1", "networkPort": 9544, "tokenContract": "../simpleasset/build/contracts/BobERC20.json", "interopContract": "../simpleasset/build/contracts/AssetExchangeContract.json", diff --git a/weaver/samples/besu/besu-cli/package.json b/weaver/samples/besu/besu-cli/package.json index 261c2c799f..952e246918 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/Makefile b/weaver/samples/besu/simpleasset/Makefile index aca71effcf..4cbb8bd18b 100644 --- a/weaver/samples/besu/simpleasset/Makefile +++ b/weaver/samples/besu/simpleasset/Makefile @@ -3,11 +3,11 @@ deploy-contracts: deploy-contract-network1 deploy-contract-network2 .PHONY: deploy-contract-network1 deploy-contract-network1: - BESU_NETWORK_HOST=localhost BESU_NETWORK_PORT=8545 npm run deploy-contract + BESU_NETWORK_HOST=127.0.0.1 BESU_NETWORK_PORT=8545 npm run deploy-contract .PHONY: deploy-contract-network2 deploy-contract-network2: - BESU_NETWORK_HOST=localhost BESU_NETWORK_PORT=9544 npm run deploy-contract + BESU_NETWORK_HOST=127.0.0.1 BESU_NETWORK_PORT=9544 npm run deploy-contract .PHONY: clean-run clean-run: diff --git a/weaver/samples/besu/simpleasset/package.json b/weaver/samples/besu/simpleasset/package.json index de3657634e..bf83792669 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 c94d06e0d0..804c4a29f2 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 8322de602e..2cfb55a2d6 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/samples/fabric/fabric-cli/src/commands/config/set.ts b/weaver/samples/fabric/fabric-cli/src/commands/config/set.ts index b11204f103..ae8d00b5b5 100644 --- a/weaver/samples/fabric/fabric-cli/src/commands/config/set.ts +++ b/weaver/samples/fabric/fabric-cli/src/commands/config/set.ts @@ -21,7 +21,7 @@ const command: GluegunCommand = { commandHelp( print, toolbox, - `fabric-cli config set network1 relayEndpoint localhost:9080`, + `fabric-cli config set network1 relayEndpoint 127.0.0.1:9080`, `fabric-cli config set <${configKeys.join('|')}> `, [], command, diff --git a/weaver/samples/fabric/fabric-cli/src/commands/configure/membership.ts b/weaver/samples/fabric/fabric-cli/src/commands/configure/membership.ts index 6c71896cbd..f599dc6167 100644 --- a/weaver/samples/fabric/fabric-cli/src/commands/configure/membership.ts +++ b/weaver/samples/fabric/fabric-cli/src/commands/configure/membership.ts @@ -26,7 +26,7 @@ const command: GluegunCommand = { commandHelp( print, toolbox, - 'fabric-cli configure network --local-network=network1 --target-network=network2 --iin-agent-endpoint=localhost:9500', + 'fabric-cli configure network --local-network=network1 --target-network=network2 --iin-agent-endpoint=127.0.0.1:9500', 'fabric-cli configure network --local-network=>', [ { @@ -76,7 +76,7 @@ const command: GluegunCommand = { print.error('IIN Agent endpoint does not contain port number.') return } - + // Create wallet credentials const [response, error] = await handlePromise(MembershipManager.syncMembershipFromIINAgent( diff --git a/weaver/samples/fabric/fabric-cli/src/commands/event/receive.ts b/weaver/samples/fabric/fabric-cli/src/commands/event/receive.ts index 791b308603..c41e8d07a2 100644 --- a/weaver/samples/fabric/fabric-cli/src/commands/event/receive.ts +++ b/weaver/samples/fabric/fabric-cli/src/commands/event/receive.ts @@ -62,13 +62,13 @@ const command: GluegunCommand = { if (options.port) { port = options.port } - + const app = express(); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false })); - + app.post('/simple-event-callback', (req, res) => { console.log("Received Event State: ", req.body.state) if (req.body.state) { @@ -79,7 +79,7 @@ const command: GluegunCommand = { } res.status(200).send('Ok'); }); - console.log(`Server is running at https://localhost:${port}`); + console.log(`Server is running at https://127.0.0.1:${port}`); console.log(`Use endpoint '/simple-event-callback' for event publishing`); await app.listen(port); } diff --git a/weaver/samples/fabric/fabric-cli/src/commands/interop-helper.ts b/weaver/samples/fabric/fabric-cli/src/commands/interop-helper.ts index c69e6fe9fe..602bb635f9 100644 --- a/weaver/samples/fabric/fabric-cli/src/commands/interop-helper.ts +++ b/weaver/samples/fabric/fabric-cli/src/commands/interop-helper.ts @@ -36,7 +36,7 @@ const command: GluegunCommand = { commandHelp( print, toolbox, - `fabric-cli interop --local-network=network2 --requesting-org=Org1MSP localhost:9080/network1/mychannel:interop:Read:a`, + `fabric-cli interop --local-network=network2 --requesting-org=Org1MSP 127.0.0.1:9080/network1/mychannel:interop:Read:a`, 'fabric-cli interop
', [ { @@ -99,7 +99,7 @@ const command: GluegunCommand = { if (!options['user']) { options['user'] = `user1` //Default user } - // TEST: fabric-cli interop --local-network=network1 localhost:9081/Nick_Network/test + // TEST: fabric-cli interop --local-network=network1 127.0.0.1:9081/Nick_Network/test // Making Interop Call using gRPC calls. print.info('Making Interop Call using gRPC calls.') const relayEnv = getNetworkConfig(options['local-network']) @@ -110,12 +110,12 @@ const command: GluegunCommand = { ) return } - + try { const appChaincodeId = process.env.DEFAULT_APPLICATION_CHAINCODE ? process.env.DEFAULT_APPLICATION_CHAINCODE : 'simplestate' const applicationFunction = process.env.DEFAULT_APPLICATION_FUNC ? process.env.DEFAULT_APPLICATION_FUNC : 'Create' const { args, replaceIndices } = getChaincodeConfig(appChaincodeId, applicationFunction) - + await interopHelper( options['local-network'], await generateViewAddress( // Typically a noop, but for some functions, we may want to do some extra processing @@ -138,6 +138,6 @@ const command: GluegunCommand = { } } -// fabric-cli interop --local-network=network1 --sign=true localhost:9081/Corda_Network/localhost:10006#com.cordaSimpleApplication.flow.GetStateByKey:H -// fabric-cli interop --local-network=network2 --remote-network=network1 localhost:9080/Fabric_Network/mychannel:interop:Read:a +// fabric-cli interop --local-network=network1 --sign=true 127.0.0.1:9081/Corda_Network/127.0.0.1:10006#com.cordaSimpleApplication.flow.GetStateByKey:H +// fabric-cli interop --local-network=network2 --remote-network=network1 127.0.0.1:9080/Fabric_Network/mychannel:interop:Read:a module.exports = command diff --git a/weaver/samples/fabric/fabric-cli/src/commands/relay/send.ts b/weaver/samples/fabric/fabric-cli/src/commands/relay/send.ts index 94c20e49b1..c1964968a4 100644 --- a/weaver/samples/fabric/fabric-cli/src/commands/relay/send.ts +++ b/weaver/samples/fabric/fabric-cli/src/commands/relay/send.ts @@ -34,7 +34,7 @@ const command: GluegunCommand = { commandHelp( print, toolbox, - `fabric-cli relay send localhost:9081/Fabric_Network/mychannel:interop:Read:TestState`, + `fabric-cli relay send 127.0.0.1:9081/Fabric_Network/mychannel:interop:Read:TestState`, 'fabric-cli relay send ', [ { @@ -161,5 +161,5 @@ const command: GluegunCommand = { }) } } -//localhost:9081/Corda_Network/localhost:10006#com.cordaSimpleApplication.flow.GetStateByKey:H +//127.0.0.1:9081/Corda_Network/127.0.0.1:10006#com.cordaSimpleApplication.flow.GetStateByKey:H module.exports = command diff --git a/weaver/sdks/besu/node/package.json b/weaver/sdks/besu/node/package.json index b6290244bd..d0bcf1fb4d 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 7582a4d4b5..b49c54121b 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" diff --git a/yarn.lock b/yarn.lock index e7635bd82a..a5e1320bbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7809,7 +7809,7 @@ __metadata: express: 4.18.2 rxjs: 7.8.1 socket.io: 4.5.4 - socket.io-client: 4.5.4 + socket.io-client-fixed-types: 4.5.4 uuid: 9.0.1 languageName: unknown linkType: soft @@ -7853,7 +7853,7 @@ __metadata: "@types/uuid": 9.0.6 axios: 1.6.0 dotenv: 16.0.1 - node-fetch: 3.3.2 + node-fetch: 2.7.0 prom-client: 13.2.0 typescript-optional: 2.0.1 ubiquity-ts-client-renovated: 1.0.0 @@ -35793,20 +35793,9 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:3.3.2, node-fetch@npm:^3.3.2": - version: 3.3.2 - resolution: "node-fetch@npm:3.3.2" - dependencies: - data-uri-to-buffer: ^4.0.0 - fetch-blob: ^3.1.4 - formdata-polyfill: ^4.0.10 - checksum: 06a04095a2ddf05b0830a0d5302699704d59bda3102894ea64c7b9d4c865ecdff2d90fd042df7f5bc40337266961cb6183dcc808ea4f3000d024f422b462da92 - languageName: node - linkType: hard - -"node-fetch@npm:^2.6.12": - version: 2.6.12 - resolution: "node-fetch@npm:2.6.12" +"node-fetch@npm:2.7.0, node-fetch@npm:^2.6.8, node-fetch@npm:^2.6.9": + version: 2.7.0 + resolution: "node-fetch@npm:2.7.0" dependencies: whatwg-url: ^5.0.0 peerDependencies: @@ -35814,13 +35803,13 @@ __metadata: peerDependenciesMeta: encoding: optional: true - checksum: 3bc1655203d47ee8e313c0d96664b9673a3d4dd8002740318e9d27d14ef306693a4b2ef8d6525775056fd912a19e23f3ac0d7111ad8925877b7567b29a625592 + checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 languageName: node linkType: hard -"node-fetch@npm:^2.6.8, node-fetch@npm:^2.6.9": - version: 2.7.0 - resolution: "node-fetch@npm:2.7.0" +"node-fetch@npm:^2.6.12": + version: 2.6.12 + resolution: "node-fetch@npm:2.6.12" dependencies: whatwg-url: ^5.0.0 peerDependencies: @@ -35828,7 +35817,7 @@ __metadata: peerDependenciesMeta: encoding: optional: true - checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 + checksum: 3bc1655203d47ee8e313c0d96664b9673a3d4dd8002740318e9d27d14ef306693a4b2ef8d6525775056fd912a19e23f3ac0d7111ad8925877b7567b29a625592 languageName: node linkType: hard @@ -35843,6 +35832,17 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:^3.3.2": + version: 3.3.2 + resolution: "node-fetch@npm:3.3.2" + dependencies: + data-uri-to-buffer: ^4.0.0 + fetch-blob: ^3.1.4 + formdata-polyfill: ^4.0.10 + checksum: 06a04095a2ddf05b0830a0d5302699704d59bda3102894ea64c7b9d4c865ecdff2d90fd042df7f5bc40337266961cb6183dcc808ea4f3000d024f422b462da92 + languageName: node + linkType: hard + "node-forge@npm:>=1.3.0": version: 1.3.1 resolution: "node-forge@npm:1.3.1" @@ -43378,18 +43378,6 @@ __metadata: languageName: node linkType: hard -"socket.io-client@npm:4.5.4": - version: 4.5.4 - resolution: "socket.io-client@npm:4.5.4" - dependencies: - "@socket.io/component-emitter": ~3.1.0 - debug: ~4.3.2 - engine.io-client: ~6.2.3 - socket.io-parser: ~4.2.1 - checksum: 8320ce4a96e9c28318b17037e412746b1d612cfba653c3c321c0e49042f0be9aeb8de67d5861e45e9aad32407bb4dd204bfe199565d78d5320aaf65253371b7f - languageName: node - linkType: hard - "socket.io-parser@npm:>=4.2.3": version: 4.2.4 resolution: "socket.io-parser@npm:4.2.4"