asherah 1.2.1 → 1.2.2
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asherah",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Asherah envelope encryption and key rotation library",
|
|
5
5
|
"main": "dist/asherah.js",
|
|
6
6
|
"repository": {
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "npx tsc",
|
|
12
|
-
"preinstall": "scripts/download-libraries.sh
|
|
12
|
+
"preinstall": "scripts/download-libraries.sh",
|
|
13
|
+
"install": "node-gyp rebuild",
|
|
13
14
|
"test:mocha": "mocha",
|
|
14
15
|
"test": "nyc npm run test:mocha",
|
|
15
16
|
"posttest": "npm run lint",
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
"license": "MIT",
|
|
21
22
|
"files": [
|
|
22
23
|
"dist/asherah.d.ts",
|
|
23
|
-
"scripts/download-
|
|
24
|
+
"scripts/download-libraries.sh",
|
|
24
25
|
"build/Release/napi-asherah.node",
|
|
25
26
|
"SHA256SUMS",
|
|
26
27
|
"SHA256SUMS-darwin",
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
echo "Downloading Asherah libraries"
|
|
4
|
+
|
|
5
|
+
source .asherah-version
|
|
6
|
+
|
|
7
|
+
rm -rf lib
|
|
8
|
+
mkdir lib
|
|
9
|
+
cd lib || 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
|
+
ARCHIVE=libasherah-x64.a
|
|
18
|
+
HEADER=libasherah-x64-archive.h
|
|
19
|
+
SUMS=../SHA256SUMS
|
|
20
|
+
elif [[ ${MACHINE} == 'aarch64' ]]; then
|
|
21
|
+
echo "Linux arm64"
|
|
22
|
+
ARCHIVE=libasherah-arm64.a
|
|
23
|
+
HEADER=libasherah-arm64-archive.h
|
|
24
|
+
SUMS=../SHA256SUMS
|
|
25
|
+
else
|
|
26
|
+
echo "Unsupported CPU architecture"
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
elif [[ ${OS} == 'Darwin' ]]; then
|
|
30
|
+
if [[ ${MACHINE} == 'x86_64' ]]; then
|
|
31
|
+
echo "MacOS x64"
|
|
32
|
+
ARCHIVE=libasherah-darwin-x64.a
|
|
33
|
+
HEADER=libasherah-darwin-x64-archive.h
|
|
34
|
+
SUMS=../SHA256SUMS-darwin
|
|
35
|
+
elif [[ ${MACHINE} == 'arm64' ]]; then
|
|
36
|
+
echo "MacOS arm64"
|
|
37
|
+
ARCHIVE=libasherah-darwin-arm64.a
|
|
38
|
+
HEADER=libasherah-darwin-arm64-archive.h
|
|
39
|
+
SUMS=../SHA256SUMS-darwin
|
|
40
|
+
else
|
|
41
|
+
echo "Unsupported CPU architecture"
|
|
42
|
+
exit 1
|
|
43
|
+
fi
|
|
44
|
+
else
|
|
45
|
+
echo "Unsupported operating system"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
curl -s -L --fail -O --retry 999 --retry-max-time 0 "https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/${ARCHIVE}" || echo "Failed to download ${ASHERAH_VERSION}/${ARCHIVE}"
|
|
50
|
+
curl -s -L --fail -O --retry 999 --retry-max-time 0 "https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/${HEADER}" || echo "Failed to download ${ASHERAH_VERSION}/${HEADER}"
|
|
51
|
+
grep -e "${ARCHIVE}" -e "${HEADER}" "${SUMS}" > ./SHA256SUM
|
|
52
|
+
#shasum -a 256 -c ./SHA256SUM || (echo 'SHA256 mismatch!' ; rm -f ./*.a ./*.h ; exit 1)
|
|
53
|
+
|
|
54
|
+
mv "${ARCHIVE}" libasherah.a
|
|
55
|
+
mv "${HEADER}" libasherah.h
|