asherah 1.0.55 → 1.0.58
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.
- package/package.json +3 -2
- package/scripts/download-binaries.sh +43 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asherah",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.58",
|
|
4
4
|
"description": "Asherah envelope encryption and key rotation library",
|
|
5
5
|
"main": "dist/asherah.js",
|
|
6
6
|
"repository": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "npx tsc",
|
|
12
|
-
"
|
|
12
|
+
"postinstall": "scripts/download-binaries.sh",
|
|
13
13
|
"test:mocha": "mocha",
|
|
14
14
|
"test": "nyc npm run test:mocha",
|
|
15
15
|
"posttest": "npm run lint",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"files": [
|
|
22
22
|
"dist/asherah.d.ts",
|
|
23
|
+
"scripts/download-binaries.sh",
|
|
23
24
|
"SHA256SUMS",
|
|
24
25
|
"SHA256SUMS-darwin"
|
|
25
26
|
],
|
|
@@ -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
|