asherah 1.0.56 → 1.0.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ ASHERAH_VERSION=v0.4.7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asherah",
3
- "version": "1.0.56",
3
+ "version": "1.0.59",
4
4
  "description": "Asherah envelope encryption and key rotation library",
5
5
  "main": "dist/asherah.js",
6
6
  "repository": {
@@ -20,8 +20,10 @@
20
20
  "license": "MIT",
21
21
  "files": [
22
22
  "dist/asherah.d.ts",
23
+ "scripts/download-binaries.sh",
23
24
  "SHA256SUMS",
24
- "SHA256SUMS-darwin"
25
+ "SHA256SUMS-darwin",
26
+ ".asherah-version"
25
27
  ],
26
28
  "devDependencies": {
27
29
  "@types/benchmark": "^2.1.1",
@@ -0,0 +1,43 @@
1
+ #!/bin/bash
2
+
3
+ echo "Downloading Asherah binaries"
4
+
5
+ source .asherah-version
6
+
7
+ rm -rf binaries
8
+ mkdir binaries
9
+ cd binaries || exit 1
10
+
11
+ OS=$(uname)
12
+ MACHINE=$(uname -m)
13
+
14
+ if [[ "${OS}" == 'Linux' ]]; then
15
+ if [[ ${MACHINE} == 'x86_64' ]]; then
16
+ echo "Linux x64"
17
+ curl -s -L --fail -O --retry 999 --retry-max-time 0 https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/libasherah-x64.so
18
+ shasum -a 256 --ignore-missing -c ../SHA256SUMS || (echo 'SHA256 mismatch!' ; rm -f ./*.so ; exit 1)
19
+ elif [[ ${MACHINE} == 'aarch64' ]]; then
20
+ echo "Linux arm64"
21
+ curl -s -L --fail -O --retry 999 --retry-max-time 0 https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/libasherah-arm64.so
22
+ shasum -a 256 --ignore-missing -c ../SHA256SUMS || (echo 'SHA256 mismatch!' ; rm -f ./*.so ; exit 1)
23
+ else
24
+ echo "Unknown CPU architecture"
25
+ exit 1
26
+ fi
27
+ elif [[ ${OS} == 'Darwin' ]]; then
28
+ if [[ ${MACHINE} == 'x86_64' ]]; then
29
+ echo "MacOS x64"
30
+ curl -s -L --fail -O --retry 999 --retry-max-time 0 https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/libasherah-x64.dylib
31
+ shasum -a 256 --ignore-missing -c ../SHA256SUMS-darwin || (echo 'SHA256 mismatch!' ; rm -f ./*.dylib ; exit 1)
32
+ elif [[ ${MACHINE} == 'arm64' ]]; then
33
+ echo "MacOS arm64"
34
+ curl -s -L --fail -O --retry 999 --retry-max-time 0 https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/libasherah-arm64.dylib
35
+ shasum -a 256 --ignore-missing -c ../SHA256SUMS-darwin || (echo 'SHA256 mismatch!' ; rm -f ./*.dylib ; exit 1)
36
+ else
37
+ echo "Unknown CPU architecture"
38
+ exit 1
39
+ fi
40
+ else
41
+ echo "Unknown operating system"
42
+ exit 1
43
+ fi