diff --git a/.github/workflows/check_cli.yml b/.github/workflows/check_cli.yml index 283b596..0eaef6b 100644 --- a/.github/workflows/check_cli.yml +++ b/.github/workflows/check_cli.yml @@ -37,4 +37,4 @@ jobs: - name: Package HaLo CLI tool (Linux) run: | cd cli - node_modules/.bin/pkg -t node16-linux-x64 package.json + node_modules/.bin/pkg -t node18-linux-x64 package.json diff --git a/.github/workflows/prod_build_cli.yml b/.github/workflows/prod_build_cli.yml index a04fbe9..c7d37a1 100644 --- a/.github/workflows/prod_build_cli.yml +++ b/.github/workflows/prod_build_cli.yml @@ -68,7 +68,7 @@ jobs: - name: Install Node.JS uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Install dependencies (root) shell: bash run: | @@ -88,9 +88,9 @@ jobs: shell: bash run: | cd cli - node_modules/.bin/pkg --compress GZip -t node16-linux-x64 -c package.json -o dist/halocli entry_cli.js - node_modules/.bin/pkg --compress GZip -t node16-linux-x64 -c package.json -o dist/halo-bridge entry_bridge.js - node_modules/.bin/pkg --compress GZip -t node16-linux-x64 -c package.json -o dist/halo-gateway entry_gateway.js + node_modules/.bin/pkg --compress GZip -t node18-linux-x64 -c package.json -o dist/halocli entry_cli.js + node_modules/.bin/pkg --compress GZip -t node18-linux-x64 -c package.json -o dist/halo-bridge entry_bridge.js + node_modules/.bin/pkg --compress GZip -t node18-linux-x64 -c package.json -o dist/halo-gateway entry_gateway.js - name: Package HaLo CLI tool (Windows) if: matrix.os == 'windows-latest' shell: bash @@ -100,7 +100,7 @@ jobs: export PKG_PATCHED_BIN='1' export PKG_CACHE_PATH='./.pkg-cache/' export PKG_IGNORE_TAG='1' - node_modules/.bin/pkg --compress GZip -t node16-win-x64 -c package.json -o dist/halocli.exe entry_cli.js + node_modules/.bin/pkg --compress GZip -t node18-win-x64 -c package.json -o dist/halocli.exe entry_cli.js - name: Package HaLo Bridge tool (Windows) if: matrix.os == 'windows-latest' shell: bash @@ -110,7 +110,7 @@ jobs: export PKG_PATCHED_BIN='1' export PKG_CACHE_PATH='./.pkg-cache/' export PKG_IGNORE_TAG='1' - node_modules/.bin/pkg --compress GZip -t node16-win-x64 -c package.json -o dist/halo-bridge.exe entry_bridge.js + node_modules/.bin/pkg --compress GZip -t node18-win-x64 -c package.json -o dist/halo-bridge.exe entry_bridge.js - name: Package HaLo Gateway tool (Windows) if: matrix.os == 'windows-latest' shell: bash @@ -120,15 +120,15 @@ jobs: export PKG_PATCHED_BIN='1' export PKG_CACHE_PATH='./.pkg-cache/' export PKG_IGNORE_TAG='1' - node_modules/.bin/pkg --compress GZip -t node16-win-x64 -c package.json -o dist/halo-gateway.exe entry_gateway.js + node_modules/.bin/pkg --compress GZip -t node18-win-x64 -c package.json -o dist/halo-gateway.exe entry_gateway.js - name: Package HaLo CLI tool (MacOS) if: matrix.os == 'macos-latest' shell: bash run: | cd cli - node_modules/.bin/pkg --compress GZip -t node16-macos-x64 -c package.json -o dist/halocli entry_cli.js - node_modules/.bin/pkg --compress GZip -t node16-macos-x64 -c package.json -o dist/halo-bridge entry_bridge.js - node_modules/.bin/pkg --compress GZip -t node16-macos-x64 -c package.json -o dist/halo-gateway entry_gateway.js + node_modules/.bin/pkg --compress GZip -t node18-macos-x64 -c package.json -o dist/halocli entry_cli.js + node_modules/.bin/pkg --compress GZip -t node18-macos-x64 -c package.json -o dist/halo-bridge entry_bridge.js + node_modules/.bin/pkg --compress GZip -t node18-macos-x64 -c package.json -o dist/halo-gateway entry_gateway.js mv "macos_bridge_app" "dist/HaLo CLI Bridge Server.app" mv "macos_pkgbuild_scripts" "dist/macos_pkgbuild_scripts" mv "Entitlements.plist" "dist/Entitlements.plist" diff --git a/cli/package.json b/cli/package.json index 71ca0bf..249a3b2 100644 --- a/cli/package.json +++ b/cli/package.json @@ -29,7 +29,7 @@ "bin": "entry_cli.js", "pkg": { "targets": [ - "node16" + "node18" ], "outputPath": "dist", "assets": [ diff --git a/cli/win_fix_binary.js b/cli/win_fix_binary.js index 9268536..44a0c84 100644 --- a/cli/win_fix_binary.js +++ b/cli/win_fix_binary.js @@ -112,7 +112,7 @@ if (process.argv.length < 3) { let tagName = process.env.GITHUB_REF_NAME; let version = null; -if (tagName && tagName.startsWith('halocli-v')) { +if (tagName && tagName.startsWith('halotools-v')) { let vStr = tagName.split('-v')[1]; let vStr2 = vStr.split('.'); version = [parseInt(vStr2[0]), parseInt(vStr2[1]), parseInt(vStr2[2]), 0]; diff --git a/halo/jwe_util.js b/halo/jwe_util.js index c65f609..725a4fc 100644 --- a/halo/jwe_util.js +++ b/halo/jwe_util.js @@ -1,6 +1,6 @@ const Buffer = require('buffer/').Buffer; const crypto = require('crypto'); -const subtle = crypto.subtle ? crypto.subtle : globalThis.crypto.subtle; +const subtle = crypto.webcrypto && crypto.webcrypto.subtle ? crypto.webcrypto.subtle : globalThis.crypto.subtle; const jose = require('jose'); class JWEUtil {